Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-24-2010, 06:47 AM   #1
Registered: Oct 2008
Location: Latitude= 9.9722, Longitude= 76.378
Distribution: Open VZ,fedora & Centos
Posts: 47

Rep: Reputation: 0
Permission issue

Hi there

Can someone please let me know how to set default file permission to 777.
Here is my situation.I have a dir /var/www/TEST folder whose permission is

drwxr-xr-x 2 fruss psacln 4096 Oct 24 07:39 TEST/

So whenever i tried to upload file as user fruss using FTP under folder TEST,file permission should be 777 instead of 644

How can this be achieved.Once possible solution i found that changing umask value in FTP server's configuration file.I'm using proFTP server.I have changed the umask value to 000 and So uploaded folder permission is 777 and that of file permission is 666 as expected.But permission needed to be 777 instead of 666 for the uploaded file.

Please advise.
Old 10-24-2010, 07:53 AM   #2
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Hi there,
cd into the mentioned folder. If you want to change the permission of all the files use 'chmod -Rv 777 *'. This will help.
Old 10-24-2010, 08:07 AM   #3
Registered: Oct 2008
Location: Latitude= 9.9722, Longitude= 76.378
Distribution: Open VZ,fedora & Centos
Posts: 47

Original Poster
Rep: Reputation: 0
Dear SilverBack

I know that will change the permission for the files to 777.I think it is for the existing file.What if when i create a new file under the folder TEST?. Do you think that newly created file will be having the same 777 permission as well ?.

Please advise me if I'm wrong.

Thank you for your response.
Old 10-24-2010, 09:30 AM   #4
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
From manual of ProFTP:
Proftpd will not create files that have the execution bit turned on, this is a security driven design decision. The permissions of the uploaded file can be changed by issuing a SITE CHMOD command can be used to change the mode of the uploaded file. Syntax of the command is: SITE CHMOD <mode> <file>.
So, it can't. But in Linux you can anything. I see 2 solutions:

1. Recompile ProFTP, that it allow of creating files with execution bit set (somewhere should be 'open' function, just need set proper flags).
2. Use inotify (it can be used even in shell scripts) to automatically change file permission after creating it.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with permission? your_shadow03 Linux - Server 1 11-22-2009 06:57 AM
Permission issue??? ThunderStrick Linux - Newbie 4 07-06-2009 11:41 PM
Changing permission issue Linux - Newbie 3 11-06-2008 03:19 PM
Permission Issue with Slackware 12.1 savrasbane Linux - Newbie 2 10-30-2008 10:05 PM
issue with permission santasballz Linux - Newbie 7 02-28-2004 11:25 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:36 AM.

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