LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2004, 04:37 AM   #1
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Rep: Reputation: 30
user rights when creating a new folder


When I create a new folder from the console, how can I change the default rights that are given to that folder ? What I want to do is that when a normal user is creating a folder the rights for that folder to be 600 or something different ...
 
Old 11-14-2004, 04:40 AM   #2
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
You have to be root to change it, but edit /etc/profile
Most likely you'll see a line that says umask 022

Just change that line to say: umask 600
(or whatever you want the new permissions to be)
 
Old 11-14-2004, 04:56 AM   #3
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
that did the trick, but can I have a different umask for each user ? I want root to create folders with 600 and a normal user with 666 ...
 
Old 11-14-2004, 05:06 AM   #4
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
I'd be careful with 666 permissions, maybe 662 would be better (sorry not to tell you how to run your system! :-)

You can make it a default for new users if you create the file /etc/skel/.bashrc

Put the umask command in that file. Whenever you create a new user it will copy the contents of the /etc/skel directory into the user's home directory.

After you do this just copy the file into each existing user's home directory.

That should do it for you. I'm not certain, but you may need to comment out the umask command out of /etc/profile.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chmod rights and folder access fieldyweb Linux - General 3 08-24-2005 04:12 AM
Assign CHMOD Rights To Mapped Windows Folder, GaneshParam Linux - Security 0 08-03-2005 05:09 AM
creating folder shortcuts trumpetdork Linux - Newbie 2 04-05-2005 08:47 PM
Squid proxy with user authentication and user rights duvanhorn Linux - Networking 0 08-07-2003 03:40 AM
User rights rcoman Linux - Networking 2 04-21-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 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