Permissions issues


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permissions issues
# 1  
Old 02-08-2006
Permissions issues

I'm hoping this is a pretty simple question. I have a problem were memebers of a group can't delete or overwrite a file. The box is setup several users all part of the same group. Now default umask is 002. The problem I run into is there are processes that add to, del, and over write files. Now if I start this processes and own the files everything works great, but if someone else starts that processes and I own the files it 's hit and miss. Sometimes is works and sometimes there are permissions errors. Any ideas on what could cause this? and yes the processes does have to be ran by other users and its just not practical to change the file owner everytime some else starts the processes nor is it good to set default permissions to rwxrwxrw.

Thanks
# 2  
Old 02-10-2006
Deleting a file requires write permission on the directory that contains it. But overwriting a file needs write permission on the file itself. See Unix File Permissions
# 3  
Old 02-10-2006
Here is an example of what I mean
user1 and user2 both part of group1

rwxrwxrwx user1 group1 file1
rwxrwxrwx user1 group1 file2
rwxrwxrwx user1 group1 prog1

user2 starts prog 1 "nohup prog1 &"

What happens is prog1 accesss file1 after is does that permissions change to
rw r r user2 group1 file1
then prog1 ends and user1 comes in and restarts it not looking at permissions.
When prog1 goes to access file1, gets a access denied error.

In both user1 and user2 profiles umask is set to 002. Why is file1 getting changed to rw r r then?
# 4  
Old 02-10-2006
prog1 must be trying to create the file with group write disabled. umask can turn off a bit that the program wants to turn on. But umask cannot ever turn on a bit if the program wants it off.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with permissions

i am trying to write a simple script to move files from one folder to another and when i try to run the script i get permission errors. I am still new to all of this and permissions still confuse me. Can anyone shed some light? I have attached screenshots of my script in the middle. (which i... (3 Replies)
Discussion started by: kcrist84
3 Replies

2. UNIX Desktop Questions & Answers

Web Server/Permissions issues.

I do not know if this is the correct place to post this, and I have tried to trawl through relevant articles to fix the issue, but I am stumped. I have a server, log as root. var/www is root:root var/www/website-one is root:root var/www/website-one/neosmart-stream is root:root This... (10 Replies)
Discussion started by: LightCastle
10 Replies

3. Solaris

Help regarding permissions

Hi I have following directory : => ls -ltr total 0 drwxrwxr-x 2 wmdwhadm dba 8192 Apr 02 23:22 in-process/ => id wmdwhadm uid=210(wmdwhadm) gid=1(staff) groups=251(cogadmin) My first question is although directory belong to dba group, then why "id wmdwhadm" command doesn't... (3 Replies)
Discussion started by: ankit_203
3 Replies

4. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

5. OS X (Apple)

Wordpress & Git, urgent permissions issues, need help...

Heya, So I recently upgraded my MacBook to a solid state drive, during the re-install of Snow Leopard I chose to abandon MAMP and use the built in Apache & PHP and in doing so moved my ~/Sites to /Library/WebServer/Documents from a Time Machine backup. During this transition the permissions... (0 Replies)
Discussion started by: s3w47m88
0 Replies

6. UNIX for Dummies Questions & Answers

Permissions Issues FTP server

Hi all, Quick question, im going to find this a bit hard to explain but ill give it a go. Basically i have an admin account on an FTP server that i want to be able to control ALL files without having to use sudo (as i need to run cron scripts to move files that are owned by a number of... (2 Replies)
Discussion started by: mokachoka
2 Replies

7. Red Hat

Issues with LDAP user/group permissions on NFS share

I can't seem to make sense of this. $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) $ $ mount /dev/sda2 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on... (6 Replies)
Discussion started by: dfinn
6 Replies

8. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

9. UNIX for Dummies Questions & Answers

permissions

I saved a perl code in xemacs. I used an xterminal to execute it but unix said that I don't have permission. I saved the files in my home directory. How do I change the permission. This is hat unix said: -ksh: ./names.pl: cannot execute (5 Replies)
Discussion started by: lnatz
5 Replies
Login or Register to Ask a Question