changing owner & grp of a file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users changing owner & grp of a file
# 1  
Old 09-27-2005
changing owner & grp of a file

Hi,

I have a file in my system as below

My user and grp id is sns / sns

-rwxrwxrwx 1 sns sns 6012357 Sep 27 06:01 sample

Is there a way to change the owner and grp of this file to app / app ... ie. as given below

-rwxrwxrwx 1 app app 6012357 Sep 27 06:01 sample

I guessed tht since I am the owner of the file, I cud do this ... and tried chown and chgrp but its not done ....

Can anyone tell me what more permission i need and how can i get this done ??

Thanks in advance,

SNS
# 2  
Old 09-27-2005
In many versions of unix, a user cannot chown a file. In some versions of unix, root can grant that power to a specific user. In some versions of unix, root can can globally allow all users to have that power. Apparantly, you are using a version of unix where a non-root user cannot chown. So you will need some help from root.

And next time, tell us what version of unix you are using. That way, you can get a more specific response.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

2. Solaris

Changing file/directory owner

Hi , I want to change owner of files or folder from 23186 to dsadm, Present ------- -rw-r--r-- 1 23186 gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 23186 gdstage 512 Sep 1 2010 sql Required as ----------- -rw-r--r-- 1 dsadm gdstage 10240 Oct 31 2007 BLTRS drwxrwxrwx 3 dsadm gdstage... (6 Replies)
Discussion started by: sridhardwh
6 Replies

3. UNIX for Dummies Questions & Answers

send email thru distribution grp

how do i send email to distribution grp. for example, right now, if i want to send email to: jane doe1 and jane doe2 echo "test" | mail -s "test" "janedoe1@yahoo.com, janedoe2@yahoo.com" ---------- Post updated at 06:14 PM ---------- Previous update was at 06:04 PM ---------- found it. ... (0 Replies)
Discussion started by: lawsongeek
0 Replies

4. Shell Programming and Scripting

Filename & Owner

Hi all! I'm trying to write a script that joins the filename and the owner (e.g. .profile_root , home_smith) Is there a easy way to do it. I've been trying with a for and playing with ls and head & tail. I would attach what I've had done but is very ugly:o (1 Reply)
Discussion started by: funyotros
1 Replies

5. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

6. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

7. UNIX for Dummies Questions & Answers

Changing owner???

How to change the owner of a file. example: suppose original owner is A and we want to change to B Please provide the syntax Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

8. Solaris

Changing owner

Hi, I own a file, when i try to change the owner of my file to other user it is throwing error like chown: changing ownership of `a.txt': Not owner my OS is sunOS 5.8 Thanks. (1 Reply)
Discussion started by: shahnazurs
1 Replies

9. UNIX for Advanced & Expert Users

Changing the process owner

How do I change the owner of the process in runtime.I'm working AIX. I would appreciate ,If I get sample scripts. (1 Reply)
Discussion started by: kkb_karthi
1 Replies

10. OS X (Apple)

Problem changing owner of symbolic links?

Strangely, chown and chmod don't seem to work on symlinks. In particular, I tried this (as root): # touch foo # ln -s foo mysymlink # chown SOMEUSER mysymlink as well as changing the last line to: # chown -h someuser mysymlink where "-h" is supposed to change the UID of the actualy... (1 Reply)
Discussion started by: noahcowan
1 Replies
Login or Register to Ask a Question