| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-27-2009, 10:40 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2009
Posts: 2
Rep:
|
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
|
|
|
|
04-27-2009, 11:00 AM
|
#2
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
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.
|
|
|
|
04-27-2009, 11:23 AM
|
#3
|
|
LQ Newbie
Registered: Apr 2009
Posts: 2
Original Poster
Rep:
|
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
|
|
|
|
04-27-2009, 12:00 PM
|
#4
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:38 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|