LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SFTP Permissions Problem (https://www.linuxquestions.org/questions/linux-newbie-8/sftp-permissions-problem-915391/)

sammyd56 11-24-2011 06:00 PM

SFTP Permissions Problem
 
Previously I've been editing files on my remote (Debian) server using an SSH command-line.

Now I'm trying to edit files using SFTP (using the standard 'Connect to Server' that comes with Ubuntu) and I'm having problems.

The issue is that the files need are owned by sam : www-data and when I edit them via SFTP using gedit, the owner changes to sam : sam meaning that the files can no longer be accessed by the web-server.

How can I make it so that editing the files doesn't change the group owner?

blue_print 11-24-2011 09:16 PM

Can you try setting setgid for www-data and then try editing the file? I hope, this will not change the file permission.

sammyd56 11-25-2011 01:23 PM

Yep, chmod g+s on the directory does the trick. Thanks very much!! :)

blue_print 11-29-2011 08:26 AM

You're welcome :)


All times are GMT -5. The time now is 10:18 AM.