LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2011, 06:00 PM   #1
sammyd56
Member
 
Registered: Sep 2003
Posts: 36

Rep: Reputation: 15
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?
 
Old 11-24-2011, 09:16 PM   #2
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
Can you try setting setgid for www-data and then try editing the file? I hope, this will not change the file permission.
 
Old 11-25-2011, 01:23 PM   #3
sammyd56
Member
 
Registered: Sep 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Yep, chmod g+s on the directory does the trick. Thanks very much!!
 
Old 11-29-2011, 08:26 AM   #4
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
You're welcome
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What are the SFTP'd user permissions? pgb205 Linux - Networking 4 04-10-2010 03:49 PM
How to set file permissions using SFTP client thesignchef Linux - Server 3 04-27-2009 01:00 PM
Problem with SFTP permissions diilbert Linux - Networking 0 02-14-2007 10:26 AM
shared folder permissions for SFTP jawilson Linux - Networking 1 07-07-2005 03:42 PM
SFTP permissions lynnwgnr Linux - Security 1 12-01-2003 01:50 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration