Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I change ownership of a directory and all of it's files. Post 1325 by mborin on Sunday 25th of February 2001 03:18:58 AM
Old 02-25-2001
Tools

How do I change ownership of a directory and all of it's files without changing permissions?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

importance of '/dev' directory

Can any one tell me what is the importance of '/dev' directory in unix. Is there any possibility to get 'root' by using the files stored in this directory. Beleive me this is not for any hacking purpose. just for learning. Hopes a detail reply. thak you (1 Reply)
Discussion started by: madhu
1 Replies

2. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies

3. UNIX for Dummies Questions & Answers

Files in work directory reverting to root ownership

Hi, I have a problem with a Unix server we do not adminster but have an application running on. The problem is that overnight, files in the /user4/work directory revert to root ownership. This causes problems as we cannot process the files. 1) What would be causing files to revert to root... (1 Reply)
Discussion started by: canman
1 Replies

4. UNIX for Dummies Questions & Answers

I am the owner,yet not allowed the change the ownership

sm860 IS the owner of the files below,but yet sm860 cannot change the ownership to bpt3a1.Please let me know why ? See below for details --- sm860@unixs741_DEV:/usr/gdp/home/ftp/bpt3a1/incoming/ahdb/T5/pcasav/daily $ ls -l pcasav* -rw-r--r-- 1 sm860 gdpintegrators 821 Sep 21 16:15... (8 Replies)
Discussion started by: MSHETTY
8 Replies

5. Shell Programming and Scripting

change multiple ownership

Good afternoon, Sir's, i owuld like to search for some advice, whats the fastest way to change multiple files ownership. For HostnameA will be their basis, for what ever files and permissions that hostnameA has, it should replicate the permissions and ownership to hostname B. $hostname... (1 Reply)
Discussion started by: invinzin21
1 Replies

6. Shell Programming and Scripting

To change the ownership at one shot

i have a directory in which i have Multiple files: Following are they==== -rw-r--r-- 1 root root 886 Jan 21 16:38 trunkn.xsd -rw-r--r-- 1 root root 244 Jan 21 16:38 trunknameCache.xml -rw-r--r-- 1 root root 1240 Jan 21 16:38 subscribercache.xsd -rw-r--r-- 1 root ... (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies

7. UNIX for Dummies Questions & Answers

Ownership of files in bin directory

When I checked to see who or what owns the files in my bin directory I noticed that some were owned by root while many others were owned by bin. Should I be concerned that there are files in this directory owned by bin or is bin the same as root as it pertains to limiting access to the files in... (3 Replies)
Discussion started by: j490428
3 Replies

8. Shell Programming and Scripting

File Ownership Change

Hi, I have several directories under an upload directory where differnt users upload their files (with exxactly the same file name every week) using their own user ids. There is a requirement that once any user uploads the file I have to clean that file and remove extra whitespaces and... (3 Replies)
Discussion started by: vbhonde11
3 Replies

9. Shell Programming and Scripting

Changing ownership of a directory, subdirectory and files as same as in another server

accidentally i have changed ownership of a directory,subdirectory and files wil below command. I want to the change ownership back as same as in same directory on another server. How can i do it? chown -R user:group /u01 is there any simple script? it is really an urgent need.. (2 Replies)
Discussion started by: johnveslin
2 Replies

10. UNIX for Dummies Questions & Answers

Change ownership of a directory

I want to change the ownership of a directory ONLY. my id id1 owns the files under the /mypath/bin but /mypath/bin is owned by id2 If i log into id2 I can't do chown id1 /mypath/bin (1 Reply)
Discussion started by: klarue
1 Replies
chown(1B)					     SunOS/BSD Compatibility Package Commands						 chown(1B)

NAME
chown - change owner SYNOPSIS
/usr/ucb/chown [-fR] owner[.group] filename... DESCRIPTION
chown changes the owner of the filenames to owner. The owner can be either a decimal user ID (UID) or a login name found in the password file. An optional group can also be specified. The group can be either a decimal group ID (GID) or a group name found in the GID file. In the default case, only the super-user of the machine where the file is physically located can change the owner. The system configura- tion option {_POSIX_CHOWN_RESTRICTED} and the privileges PRIV_FILE_CHOWN and PRIV_FILE_CHOWN_SELF also affect who can change the ownership of a file. See chown(2) and privileges(5). OPTIONS
The following options are supported: -f Do not report errors. -R Recursively descend into directories setting the ownership of all files in each directory encountered. When symbolic links are encountered, their ownership is changed, but they are not traversed. USAGE
See largefile(5) for the description of the behavior of chown when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). FILES
/etc/passwd Password file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
chgrp(1), chown(2), group(4), passwd(4), attributes(5), largefile(5), privileges(5) SunOS 5.10 21 Jun 2004 chown(1B)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy