help with permissions - execute but not delete


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers help with permissions - execute but not delete
# 1  
Old 05-27-2007
MySQL help with permissions - execute but not delete

Hi,

We have 2 users and one directory (dir). One user is admin user and other use r is operator user. who is responsible for just executing the scripts e.g. startWeblogic and stopWeblogic etc, we want to restrict this operator user in such a way that he can only execute these files and he should NOT be able to delete or change these files but he should be able to VIEW these files

I want that one user (user1)

1) should be able to run/execute any script/file
2) should NOT be able to delete these files
3) should NOT able to change these files
4) should be able to write a new file in directory as when user is executing the script then it creates log file so it is required else script will fail
5) should be able to view the files


I tried like this
created a directory with user2(admin) with all files

1) chmod -R 775 <dir>
2) cd <dir>
3) find . -type f | xargs chmod 755

Now my user1 who is in same group as user2 is able to do the following

1) able to run/execute any script/file
2) able to delete these files [he is able to delete files Smilie ]
3) NOT able to change these files
4) able to write a new file in directory as when user is executing the script then it creates log file
5) able to view the files

my only worry is step 2, i dont want this user to delete these files but when i give 755 permision then he is able to delete if i give some other permission then he is not able to execute scripts.

Please let me know what is the best way and how can we achieve it

Thanks
Rel
# 2  
Old 05-27-2007
sticky bit

I am sure i can do this by setting sticky bit, but root is NOT doing this, so looking for some other option
# 3  
Old 06-01-2007
Look in to setting up sudo on the box. Sudo is what I have used to give particular users permissions to run scripts and start and stop applications without compromising the system. It may even be included in your linux or unix distribution.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to give permissions to read write but not delete the file?

i want to give users the ability to create write and read files in other user directory , but not to have option to delete the file after created ( sticky bit not going to work here ... ) for example : i have user : manager with directory repository i have user : worker1 that need to write... (4 Replies)
Discussion started by: umen
4 Replies

2. UNIX for Dummies Questions & Answers

Script without execute permissions will work for a user?

Please help me to understand the issue: Issue: There are shell scripts in a user home directory (/home/user_1) without execute permissions (rw-r--r--) to owner,group and world These shell scripts were able to execute/work previously but its not working now and it says permission denied or... (2 Replies)
Discussion started by: MSK_1990
2 Replies

3. Shell Programming and Scripting

Folder permissions to delete

I am using the below command to delete files from directories and subdirectories find /test/abc/xyx -type f -mtime +7 -exec rm -f {} \; there are some subfolders in xyx for which i don't have permission to delete. Is there a way i can check the permission of the folder first and then delete... (4 Replies)
Discussion started by: ch33ry
4 Replies

4. UNIX for Dummies Questions & Answers

Using find to search for any owner having execute permissions.

Hi I need help. I need to use find (or grep I don't care) to recursively search for files who have any kind of executable permissions (group and/or owner and/or other). I am looking for *.c and *.h This what I am using now: find . -name *.h -perm -111 -print but I don't want to retype that... (4 Replies)
Discussion started by: dissectcode
4 Replies

5. Solaris

Why user has permissions to execute 'init 0'?

Hi all. On one workstation run Solaris 10 a simple user can to execute 'init 0' command without input (su and root password). Example: % init 0 % OK I don't understand how user can execute 'init 0' command on this workstation? 1) I checked /usr/local/etc/sudoers all lines are... (6 Replies)
Discussion started by: wolfgang
6 Replies

6. UNIX for Dummies Questions & Answers

Running file without execute permissions

Please explain this strange behavior to me bash-2.03$ ls -l abc -rw------- 1 bashboy users 319 Sep 21 18:02 abc bash-2.03$ ./abc bash: ./abc: Permission denied bash-2.03$ . abc Successfully run I wanted to ask how the file executes without the execute permissions when we... (3 Replies)
Discussion started by: rakeshou
3 Replies

7. UNIX for Dummies Questions & Answers

Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following: -rw-rw---- 1 jg dp 18648 Aug 22 10:06 nx081508.txt -rw-rw---- 1 jg dp 22422 Aug 22 10:06... (1 Reply)
Discussion started by: joeyg
1 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. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies
Login or Register to Ask a Question