/go/permission: permission from the Command Line

/go/permission controls what FTP users of one hosting account may do. Each run switches one permission on or off: For each change, the command: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Stop FTP logins for a domain
/go/permission example.com DisableFTP

Options

Argument Required Notes
domain Yes The account’s primary domain, which must exist and not be in the trash.
action Yes One of the eight actions below. Names are case-sensitive.

Actions

Action Effect Confirmation message
EnableFTP Allows FTP login. <domain>: FTP is currently enabled.
DisableFTP Blocks FTP login. <domain>: FTP is currently disabled.
EnableUpload Allows uploads. <domain>: FTP upload is currently enabled.
DisableUpload Blocks uploads and every other change to files. See What each action changes. <domain>: FTP upload is currently disabled.
EnableDownload Allows downloads. <domain>: FTP download is currently enabled.
DisableDownload Blocks downloads. <domain>: FTP download is currently disabled.
EnableDelete Allows deleting files and folders. <domain>: FTP delete is currently enabled.
DisableDelete Blocks deleting files and folders. <domain>: FTP delete is currently disabled.

Examples

# Block FTP login for a domain
/go/permission example.com DisableFTP

# Allow FTP login again
/go/permission example.com EnableFTP

# Make FTP read-only: no uploads, no other changes
/go/permission example.com DisableUpload

# Allow uploads but not deleting
/go/permission example.com DisableDelete

# Check whether FTP login is blocked
grep example.com /etc/vsftpd/user_list

# See the domain's other FTP restrictions
cat /etc/vsftpd/permission/example.com

Output

Outcome What you get
Action applied The confirmation message from the table above.
Account missing or in the trash Account <domain> not exists. Exit status 1. Nothing is changed.
Unknown action No message. Nothing is changed, but vsftpd is still restarted.

The confirmation is printed even if a step before it failed, so don’t treat it as proof the change worked. Check the files listed in What each action changes when it matters.

Log

Each run appends one line to /var/log/go/permission.log:

[Nov 21 12:00:00]# permission example.com DisableFTP

See the full reference at /go/permission and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *