LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-27-2009, 10:40 AM   #1
thesignchef
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
How to set file permissions using SFTP client


I have created 3 users with all the same group. I want the umask to be 0002 so that new files are 0775. I edited /etc/profile so that umask for that group would be 0775. That works when SSHed into that account, although, using FileZilla and SFTP into the account sets files at 0755 by default still.

Please help.

Thank you.

~Shawn
 
Old 04-27-2009, 11:00 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
AFAIK, sftp (in of itself) honors the user's umask. Are you sure your sftp client isn't doing some permission changes for you? Try sftp from the command line and see if it is behaving the way you would expect.
 
Old 04-27-2009, 11:23 AM   #3
thesignchef
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Original Poster
Rep: Reputation: 0
I just tried sftp using one of the accounts. It set the file to 0755. Again, I am trying to have it set to 0775. It can't be sshd, I don't think, because SSHing into the account and making a file is correct at 0775 like how I set it up in /etc/profile. Is it possible it is not reading /etc/profile when SFTPing into the account with FileZilla. I really don't think FileZilla is doing anything either.

Thank you
 
Old 04-27-2009, 12:00 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Hmm, a sftp login doesn't appear to read /etc/bashrc either (which makes sense, since it's the startup file for a particular interactive shell).

Read the manpages for sshd(8). A snippet follows:
Quote:
LOGIN PROCESS
When a user successfully logs in, sshd does the following:
...
6. Reads the file ~/.ssh/environment, if it exists, and users are
allowed to change their environment. See the
PermitUserEnvironment option in sshd_config(5).
...
8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists,
runs it...
You will likely need to work with that information.
 
  


Reply

Tags
permissions, sftp, ssh



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
hot to set file permissions so users cant delete ? igorkrnic Linux - Server 1 03-14-2009 11:46 AM
Using a Windows XP client to set permissions on a Samba share Wendellz Linux - Software 2 02-09-2007 08:01 AM
cannot edit file as root with write permissions set? Mishley Red Hat 4 08-05-2004 12:23 PM
Where to set default file permissions (umask)? tredegar Linux - Newbie 14 01-27-2004 05:10 PM
How to set correct file/directory permissions pat.delaney Linux - Networking 5 12-02-2003 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:35 PM.

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
Open Source Consulting | Domain Registration