LinuxQuestions.org
Review your favorite Linux distribution.
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-2014, 06:11 AM   #1
fermat97
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Rep: Reputation: Disabled
changing the default permission for both directory and files to 775 with umask


Hi
I want to change my default direcoty and file permission for newlly created files to 775, quite similar (rwxrwxr-x). umask does it with a subtraction of base value (which is 777 for directories and 666 for files), so when I put $umask 002 the directory permission is changed into 775 but my file permission changed into 664. Is it possible to make both 775 with umask or any other trick?

cheers,
pierre
 
Old 11-14-2014, 08:02 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,990

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You can use dmask and fmask in addition to umask. The link below has an explanation in post #4 and more details in later posts.

http://ubuntuforums.org/showthread.php?t=1453342
 
  


Reply

Tags
files, folders, permission, umask


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
Changing default umask lotsofquestions Ubuntu 1 08-21-2011 02:14 PM
set default umask to a directory or a group luvlinux2009 Linux - Security 4 09-17-2009 09:54 PM
Default permission on files/directory wegadnie Linux - Newbie 5 11-20-2008 04:27 AM
umask and default file permission cool9292 Linux - Newbie 2 03-10-2006 08:03 PM
Changing File Permission in a FTP directory to prevent deleting of files shawnbishop Linux - Software 3 01-10-2006 06:41 AM


All times are GMT -5. The time now is 09:01 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration