Sponsored Content
Top Forums Shell Programming and Scripting Is possible to use umask to set file permission as 775? Post 302372239 by visio2000 on Tuesday 17th of November 2009 11:24:34 AM
Old 11-17-2009
Is possible to use umask to set file permission as 775?

Hi, all!
Is it possible to use umask and to set the file permission level as 775?

I know I can add chmod into my scripts but I just want to explore the umask option.

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

set up cron permission in Sun

Under this directory: /var/spool/cron/crontabs/ I have the following users: adm lp oracle root sys uucp I believe who are able to start a cron job. I am trying to create a cronjob under user banjob so that it can delete files older than 30 days. How can I add user banjob... (4 Replies)
Discussion started by: simt
4 Replies

2. AIX

set permission to files in /tmp

Trying to setup user to have the ability to delete any files (regardless of owner) in /tmp. I've tried almost everything... the permission on the folder is drwxrwxrwt 10 bin bin, and at one point I give all the possible permission (short of root) I can give to the user, and he still can't delete... (2 Replies)
Discussion started by: cchiang12
2 Replies

3. UNIX for Dummies Questions & Answers

How can we set the Sticky bit in the umask itself

How can we set the Sticky bit in the umask itself. Please help me :confused: (3 Replies)
Discussion started by: geniman2004
3 Replies

4. UNIX for Dummies Questions & Answers

Change permission for a set of files

Hi there, I want to change from this permission -r-xr-xr-x to -r-xr-xr-- for a set of files under unix. Can someone help me to go-about doing this in one shot. Cheers, RN (2 Replies)
Discussion started by: karthickrn
2 Replies

5. Shell Programming and Scripting

set permission on file to 777

Here is the sample code I'm trying to execute. I see that the permission on the file is set to 755 always I want to change it to 777. Please help me with this. code : #!/usr/bin/perl use File::Path qw(make_path remove_tree); my $path = "2010/sam"; make_path($path,{mode=>0777}); ... (1 Reply)
Discussion started by: hansini
1 Replies

6. UNIX for Advanced & Expert Users

How to set default file system permission?

Default file system currently is 664. I would like to get it as 774. As other users of the same group was not able execute the file created any any user. chmod cannot be used in my case. (Files are created and executed the programs owned by different vendors) we know that umask is not going... (3 Replies)
Discussion started by: deepakwins
3 Replies

7. UNIX for Dummies Questions & Answers

How to set default permission

Hey Guys, First post here. I just started learning UNIX a few weeks ago. My issue: I use FreeNAS which is based off of UNIX in my network environment which hosts files that my team needs to access. Each user has their own login but we are all part of a group called "ITLIC". I have a share... (15 Replies)
Discussion started by: uglycustoomer
15 Replies

8. UNIX for Dummies Questions & Answers

Write (save time) Permission set

When am saving a file using my username in Linux environment, the file permission granted is rw-r--r-- I have to manually change the permissions using chmod command. How do i write it to the disk as rw-rw-r while saving my file. (6 Replies)
Discussion started by: Avishek_rc1
6 Replies

9. Solaris

How to set multiple ownership permission on a file/directory?

Hi, Any ideas to set multiple ownership permission on a file/directory on Solaris? I need a folder to have multiple ownership on the 2 nodes servers. The 2 nodes servers require to mount a SMBFS with different user ID. Please assist. Thanks. (6 Replies)
Discussion started by: freshmeat
6 Replies

10. Solaris

Umask permission

Hi All please help in this .. I have application user called: startsys umask already defined in the profile of application user as umask 033. Actually application creating files once the file getting create it created with different permission which is not the same of the defined... (8 Replies)
Discussion started by: AbuAliiiiiiiiii
8 Replies
umask(2)							System Calls Manual							  umask(2)

NAME
umask - Sets and gets the value of the file creation mask SYNOPSIS
#include <sys/types.h> #include <sys/stat.h> mode_t umask ( mode_t cmask ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: umask(): POSIX.1, XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the value of the file mode creation mask. DESCRIPTION
The umask() function sets the file mode creation mask of the process to the value of the cmask parameter and returns the previous value of the mask. The cmask parameter is constructed by logically ORing file permission bits defined in the sys/mode.h header file. Whenever a file is created (by the open(), mkdir(), or mknod() function), all file permission bits set in the file mode creation mask are cleared in the mode of the created file. This clearing lets users restrict the default access to their files. The mask is inherited by child processes. RETURN VALUES
Upon successful completion, the previous value of the file mode creation mask is returned. RELATED INFORMATION
Commands: chmod(1), mkdir(1), Bourne shell sh(1b), POSIX shell sh(1p), umask(1) Functions: chmod(2), mkdir(2), mknod(2), open(2), stat(2) Standards: standards(5) delim off umask(2)
All times are GMT -4. The time now is 12:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy