Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd February 2007, 12:38
asyadiqin asyadiqin is offline
Senior Member
 
Join Date: Jul 2006
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default Setting Default File Permission For FTP & SSH

Hi all,

I have a Fedora Core 5 server running ProFTP and SSH. Currently, any files uploaded to the server either by FTP or SSH is given a default permission of 644.

How can I change this so that the default file permission is 664.

Please provide detailed instruction is possible, eg. files to modify, etc...

Thanks and hopefully someone can help me.
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2007, 15:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

In /etc/proftpd.conf there is a Umask setting. Change this from 022 to 002 and restart Proftpd.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 4th February 2007, 17:09
asyadiqin asyadiqin is offline
Senior Member
 
Join Date: Jul 2006
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks falko.

How about changing the default permission for those files uploaded via SSH or SFTP, eg. those using softwares like WinSCP, etc....

Any ideas where I set the permission similar FTP, eg. 664.

Thanks again.
Reply With Quote
  #4  
Old 5th February 2007, 14:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by asyadiqin
How about changing the default permission for those files uploaded via SSH or SFTP, eg. those using softwares like WinSCP, etc....
I'm not sure. Maybe you can set this in WinSCP?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 5th February 2007, 15:12
asyadiqin asyadiqin is offline
Senior Member
 
Join Date: Jul 2006
Posts: 120
Thanks: 0
Thanked 1 Time in 1 Post
Default

The reason that I do not wish to set the file permission on the client level is basically I do not know what client my users might be using and it will be a tedious task to tell everyone to configure whatever client program they are using to set it to umask 002.

Therefore, it would be ideal if I could set it as default at the server level.

I managed to set the default umask using the commandline

Quote:
[root@fc5-i2 ~]# umask
0022
[root@fc5-i2 ~]# umask 002
[root@fc5-i2 ~]# umask
0002
However, if the server is restarted, it defaulted back to 0022. So, I was wondering where the server gets its default umask value, ie. 0022.
Reply With Quote
  #6  
Old 5th February 2007, 15:38
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

The default is set in /etc/profile. You can change to your likes, but be careful. It also impacts e.g. the creation of directories. It may leave directories more open than you really want .....
Reply With Quote
  #7  
Old 8th February 2008, 18:08
kchopein kchopein is offline
Junior Member
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default User's profile?

Hi!

I'm an Ubuntu user, so I'm not sure if this works in Fedora too, but there it goes!
You can have a .profile file for each user and there you can define custom umask, so it will affect only that user.

Hope this helps!!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dspam planet_fox General 6 20th January 2007 19:42
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 18:17
HotSaNIC domino Tips/Tricks/Mods 23 6th November 2006 06:19
jamed up my table borders?? Boon-Dog-Danny Installation/Configuration 5 23rd September 2006 17:12
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29


All times are GMT +2. The time now is 22:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.