Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Write (save time) Permission set Post 302851293 by MadeInGermany on Sunday 8th of September 2013 04:07:11 AM
Old 09-08-2013
The umask sets the default permissions for new files. Applications (processes) can set further restricted permissions in the open() kernel call. Or it can call chmod() afterwards.
If this is the case, you can maybe set the desired permissions in an application preference ...
 

10 More Discussions You Might Find Interesting

1. Debian

Turning on write-permission in Debian?

How can i do that? Is it safe? Why is it disabled by default? Thanks /Richard ++ ie: the program to write to other users on my computer. -- (3 Replies)
Discussion started by: riwa
3 Replies

2. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies

3. UNIX for Dummies Questions & Answers

Vi, write something then try to save & quit.

If I'm in Vi, write something then try to save & quit. :wq I get: "myvifile" "myvifile" E212: Can't open file for writing Press ENTER or type command to continue It won't let me save... Is it because other users on the network have access to the file also? Or I don't have permission to save? Thanks... (5 Replies)
Discussion started by: JudoMan
5 Replies

4. UNIX for Dummies Questions & Answers

How can I set save daylight time

Hi everybody... I am using IBM unix server . Server take time options from satellite but server is not include true setting . What can I do? (2 Replies)
Discussion started by: deox
2 Replies

5. UNIX for Dummies Questions & Answers

Need to remove Group write permission .

How would i write a command that can find all the objects under the etc directory that have group write permission enabled and have not been accessed in the last X days. This is what i got from internet souce but i m not able to modify it according to my distribution. find /etc -perm... (1 Reply)
Discussion started by: pinga123
1 Replies

6. Debian

Write permission for USB device

Hello, I need to run an application in wine that requires write permission to a USB device. Wine users must not have root privileges. On FreeBSD this could be accomplished by adding the user to the wheel group but I am using Debian 6.0. From looking at the passwd file it is not obvious what... (6 Replies)
Discussion started by: snorkack59
6 Replies

7. Red Hat

useradd w/o write permission on /etc/passwd

Hi root user creates a user using the useradd command. This command creates an entry in the /etc/passwd file. /etc/passwd file has rw permission for the root user. Now, if I happen to remove the w permission for the root user, useradd command still is successfully creating entry in the... (3 Replies)
Discussion started by: guruprasadpr
3 Replies

8. UNIX for Dummies Questions & Answers

Save cron job get permission denied

After I edit the cron job by using crontab -e and using :wq! to save, i got following error message: "/tmp/crontabxvaarX" 1 line, 60 characters crontab: /tmp/crontabxvaarX: Permission denied Could anyone please help? (1 Reply)
Discussion started by: Alex Li
1 Replies

9. Red Hat

SE Linux write permission denied

Hi, In my server I am getting below errors in "/var/log/messages": Oct 8 14:45:44 LKOGOMEEMM01 kernel: type=1400 audit(1444295744.792:15818): avc: denied { write } for pid=53421 comm="ip" path="/var/VRTSvcs/log/tmp/IPMultiNIC-8" dev=dm-0 ino=2754879 scontext=system_u:system_r:ifconfig_t:s0... (4 Replies)
Discussion started by: rochitsharma
4 Replies

10. UNIX for Beginners Questions & Answers

Setting write permission for particular user

Hi All, We have a scenario in production where we want only one user from a group to modify the file. The file is not set to write permission for application manager. -r--r--r-- 1 amgr u00 15661716 Aug 30 00:06 DCI.dat So here amgr will have permission to edit the file. We want a... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies
UMASK(3)								 1								  UMASK(3)

umask - Changes the current umask

SYNOPSIS
int umask ([int $mask]) DESCRIPTION
umask(3) sets PHP's umask to $mask & 0777 and returns the old umask. When PHP is being used as a server module, the umask is restored when each request is finished. PARAMETERS
o $mask - The new umask. RETURN VALUES
umask(3) without arguments simply returns the current umask otherwise the old umask is returned. EXAMPLES
Example #1 umask(3) example <?php $old = umask(0); chmod("/path/some_dir/some_file.txt", 0755); umask($old); // Checking if ($old != umask()) { die('An error occurred while changing back the umask'); } ?> NOTES
Note Avoid using this function in multithreaded webservers. It is better to change the file permissions with chmod(3) after creating the file. Using umask(3) can lead to unexpected behavior of concurrently running scripts and the webserver itself because they all use the same umask. PHP Documentation Group UMASK(3)
All times are GMT -4. The time now is 11:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy