Skip to content

Instantly share code, notes, and snippets.

@gonzalovazquez
Created July 27, 2014 12:58
Show Gist options
  • Save gonzalovazquez/eefd710b3347bbd273ba to your computer and use it in GitHub Desktop.
Save gonzalovazquez/eefd710b3347bbd273ba to your computer and use it in GitHub Desktop.
Adding FTP Access to secondary users to an individual directory. Webfaction
1. Allow the other user account to locate directories that it has access to within your home directory.
setfacl -m u:secondary_username:--x $HOME
2. Remove the other user’s default access to the applications
setfacl -m u:secondary_username:--- $HOME/webapps/new_app
3. Grant the user read, write, and execute access to the application’s files and directories
setfacl -R -m u:secondary_username:rwx $HOME/webapps/application
4. Grant the user read, write, and execute access to any files and directories created in the application in the future
setfacl -R -m d:u:secondary_username:rwx $HOME/webapps/application
5. Set your account’s group as the owner of any new files in the application’s directory.
chmod g+s $HOME/webapps/application
6. Grant your account full access to files in the application directory, including any files created in the future by the secondary user
setfacl -R -m d:u:primary_username:rwx $HOME/webapps/application
7. The secondary can add a convenience symlink from their home directory to the application directory. To create the symlink:
ln -s /home/primary_username/webapps/application $HOME/application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment