UNIX/Linux User permisions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting UNIX/Linux User permisions
# 1  
Old 01-24-2012
UNIX/Linux User permisions

Hi Guys,

I have a program that runs but now everytime the user tries to do chown userid:groupid it fails with operation not permit.

I do have root access to the server. How do I grant the user chown priviledge?

Please Help !!!!!!!!!!!!!

Thanks in advance...
# 2  
Old 01-24-2012
Only the owner of the file (or root) can issue a chown.
If you are the owner and you issue a chown to another user, remember that after issuing the chown you will no longer own the file.
# 3  
Old 01-24-2012
You mean when the "user" tries to do "chown" it fails?
Who owns that file?

If you want that "user" to "chown" the file which doesn't belong to him, you can make use of sudoers.

Add an entry like this to /etc/sudoers. use visudo to edit the /etc/sudoers file
Code:
user     ALL=NOPASSWD:/usr/bin/chown

And then ask the user to do something like this to own the file
Code:
sudo chown user:group file

*** Be advised, the command chown will now run as root for that particular user! ***

BTW, which is your OS? sudo is for Linux. If solaris, you can look into RBAC.

--ahamed
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Pam.d and make difference between AD User and local user on Linux

Hello, i configured rhel linux 6 with AD directory to authorize windows users to connect on the system and it works. i have accounts with high privileges (oracle for example) if an account is created on the AD server i would to block him. I looked for how to do, for the moment all the... (3 Replies)
Discussion started by: vincenzo
3 Replies

2. Shell Programming and Scripting

How to enforce user to Enter text when login to a UNIX / Linux system?

Hi. I inject my tracklogin.sh script in the profile of each user. $ more .profile ./tracklogin.sh # This is the default standard profile provided to a user. MAIL=/usr/mail/${LOGNAME:?} bash-3.2$ more tracklogin.sh #!/bin/bash tdate=$(date +"%d%m%y") mkdir -p /tmp/root_log... (20 Replies)
Discussion started by: mohtashims
20 Replies

3. Red Hat

SFTP User creation in Redhat Linux/UNIX

SFTP user creation step… Create a group # groupadd sftp_users If the users doesn’t exist on system , use below command : # useradd -G sftp_users -s /sbin/nologin username # passwd username For already existing users , use below usermod command : # usermod –G... (1 Reply)
Discussion started by: taherahmed
1 Replies

4. UNIX for Dummies Questions & Answers

Best way for central user managet UNIX/Linux/win?

Hey there, I want to centralize my user managet in the next days, at first i want only centralize the user from my local network and later also from my servers. So I started looking around what I could use for this and only found openLDAP. I want to manage users for linux, OSX and Windows (if... (3 Replies)
Discussion started by: dryPants
3 Replies

5. Shell Programming and Scripting

How to change passwords for User accounts on multiple UNIX/Linux machines remotely?

Hello Experts, Need some direction on creating shell script for following environment: We have about 20 people in the team working as Oracle DBA's (sysdba's and appdba's). Total Servers which is a mix of Unix and Linux are 200. We do not have Root user access on any of the servers and... (3 Replies)
Discussion started by: sha2402
3 Replies

6. Shell Programming and Scripting

Management application user rights on the files in a Unix / Linux

good evening .. I have a plea, who I can help me with a management application user rights on the files in a Unix / Linux I need for college .. .. and not told us no clue .. thank you (1 Reply)
Discussion started by: alex90
1 Replies

7. UNIX for Dummies Questions & Answers

Difference between : Locked User Account & Disabled User Accounts in Linux ?

Thanks AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies

8. UNIX for Advanced & Expert Users

Access permisions issue for directories

I am getting the different accessing permissions for the directories ,for some directories it is drwxr-sr-x, for some other directories it is like drwxr-xr-x. what is the difference between these 2 access permisions of the directories? (1 Reply)
Discussion started by: bishnu.bhatta
1 Replies

9. UNIX for Dummies Questions & Answers

file permisions 2000 to OSX

Could anyone tell me how or point me in the right direction on how to save files from a 2000box to a OSX server with the correct file permissions. File goes over and the only person that has r/w permissions is the owner everyone else is read only. HELP!!! (2 Replies)
Discussion started by: mom
2 Replies
Login or Register to Ask a Question