LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-12-2001, 10:56 AM   #1
gummyworms
LQ Newbie
 
Registered: Jul 2001
Location: Wisconsin
Distribution: Redhat 7.1
Posts: 4

Rep: Reputation: 0
Automatically setting new files on the server as 755


Hello linux gurus, I hope you can assist me on this. A little background info first: I currently run a web server on Redhat 7.1, it's web documents directory is /www/. I do all of my work on a windows machine, using Samba to access the linux box.

When I create a new file on the windows box and drop it into the /www/ directory, it is assigned a 744 permission, which blocks people on the internet from accessing the file (403 forbidden) for some reason, it works fine with 755. So, everytime I add a file, I have to "chmod -R /www/" the whole directory. Im sure there is a way to automatically set all new files on the server, or just that directory, to a 755 permission, but I have no idea how.

How do I make a folder (/www/) automatically set all files added to it to 755 permission?

-Thanks
 
Old 07-12-2001, 05:11 PM   #2
cinnix
Member
 
Registered: Jun 2001
Location: Northern Ohio
Distribution: RedHat, Engarde and LFS
Posts: 237

Rep: Reputation: 30
check into the 'umask' command. It shold do exactly what you want
 
Old 07-12-2001, 06:30 PM   #3
gummyworms
LQ Newbie
 
Registered: Jul 2001
Location: Wisconsin
Distribution: Redhat 7.1
Posts: 4

Original Poster
Rep: Reputation: 0
Do you know of any good websites or forums where I can obtain information on umask?
 
Old 07-12-2001, 11:32 PM   #4
cinnix
Member
 
Registered: Jun 2001
Location: Northern Ohio
Distribution: RedHat, Engarde and LFS
Posts: 237

Rep: Reputation: 30
No I don't know of any sites but it pretty much works like this if I understand correctly.

The command format would be something like.

umask 022 /home/httpd

The 022 is the permission settings. It is derived from the subtracted value of permissions that you would want in chmod.

example.

777 - Beginning value.
-755 - Permisions that you want
------
022 - your settings for umask.

I am sure there is a better way to explain it, but that was the best I could do.
 
  


Reply



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
Setting WEP Key automatically in Sarge 0ddba11 Debian 1 11-28-2004 09:34 AM
how to change exisitng files/directory permission from 755 to 770 mweil Linux - Newbie 3 07-01-2004 10:18 AM
Automatically Setting File Permissions in a Directory maneeshsethi Linux - Security 2 05-27-2004 07:42 PM
Back-up files on a Macintosh OS9.0 to RH 9.0 server automatically JUSTAUSER Linux - Newbie 1 10-21-2003 10:28 AM
Setting upp a samba files server! eXor Linux - Newbie 2 10-09-2002 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:40 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
Open Source Consulting | Domain Registration