Results 1 to 2 of 2

Thread: How to get SFTP write access to entire directory

  1. #1
    Join Date
    Sep 2007
    Beans
    17

    How to get SFTP write access to entire directory

    I made a new group and user and added the user to have RW permissions in /var/www/ but I cannot upload or make changes in its subdirectories so I have to add access to each directory so:

    chown -R :ftpuser /var/www/cms/
    chmod -R g+rw /var/www/cms/

    I'd rather be able to control the entire /www with my user ftp and its group ftpuser.

  2. #2
    Join Date
    Sep 2006
    Beans
    8,623
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to get SFTP write access to entire directory

    Do you mean that new directories aren't getting the right permissions? That should be fixable by setting the SetGUID bit.

    Code:
    sudo chgrp -R sftpusers /var/www
    
    sudo find /var/www -type d -exec chmod g=rwxs "{}" \;

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •