Sponsored Content
Full Discussion: chown of a Directory
Top Forums Shell Programming and Scripting chown of a Directory Post 302551474 by bartus11 on Tuesday 30th of August 2011 01:24:36 PM
Old 08-30-2011
Are you running this command as root?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

chown and NIS

I have a box that people are using to ssh to our customer sites. Everyone uses an NIS account that I have created for them. I also create home directories for these users as well on this box. My question is can use a command, like chown, to change ownership of the directories I create to the... (2 Replies)
Discussion started by: Jody
2 Replies

2. UNIX for Dummies Questions & Answers

chown and permissions

how i could give to user permission(delete,execute and so on) and ownership to files? Thanks (1 Reply)
Discussion started by: ithost
1 Replies

3. AIX

chown

hello chown not change ownership before: 205:system ~kuku chown kuku:system ~kuku after no change 205:system ~kuku aix box can someone help me? ariec (2 Replies)
Discussion started by: ariec
2 Replies

4. UNIX for Dummies Questions & Answers

chown -R under root directory

Hi I executed command "chown -R xxx:xxx /" with user root... and it was too late when I found the mistake. Ownership of some files under the root directory had already become xxx:xxx. Is there a way that can recovery the ownership of all my files back to the point where they were? I really thanks. (2 Replies)
Discussion started by: password636
2 Replies

5. UNIX for Dummies Questions & Answers

chown

is there a difference in chown on a file or a directory? how do i chown a directory and all the contents? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

6. Shell Programming and Scripting

cp, chown, untar

hello i want shell script. i have a source.txt /home/user409/public_html/test/ /home/user09876/public_html/xdsss/ /home/user9765/public_html/320xxx/ . . . maybe 1000 lines i want . 1.read a source.txt 2.untar special.tar.gz into these directory in source.txt 3.i want to... (14 Replies)
Discussion started by: topic32428285
14 Replies

7. Solaris

chown

Hello My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into... (3 Replies)
Discussion started by: Street
3 Replies

8. Solaris

restrict sudo and chown in specified directory

Hi Dears, I have one requirement like this: general user A can execute command C with root privilege by sudo configuration some folders and files are created during the command C execution user A cannot access those folders and files because the owner is root user, so I want the user A... (0 Replies)
Discussion started by: crest.boy
0 Replies

9. Shell Programming and Scripting

excluding a directory with chown, chmod

does anyone know how to exclude a directory with chown or chmod? im trying to do something like this chown $username:$username $directory/* chown $username:$username $directory/.* chown $username:$username $directory and find $directory/* -type f -exec... (1 Reply)
Discussion started by: vanessafan99
1 Replies

10. Shell Programming and Scripting

Using chown command.

I am working on a test machine. I just discovered that I have misunderstood the way the following command is run. chown -Rv some_user:users /some_folder/*This command do exactly what I want. Change the owner of every things from the named folder and in all child folders. But of course it leave... (13 Replies)
Discussion started by: jcdole
13 Replies
PIVOT_ROOT(8)						       Maintenance Commands						     PIVOT_ROOT(8)

NAME
pivot_root - change the root file system SYNOPSIS
pivot_root new_root put_old DESCRIPTION
pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details. Note that, depending on the implementation of pivot_root, root and cwd of the caller may or may not change. The following is a sequence for invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH: cd new_root pivot_root . put_old exec chroot . command Note that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the root directory of the shell. Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shell's root or not). EXAMPLES
Change the root file system to /dev/hda1 from an interactive shell: mount /dev/hda1 /new-root cd /new-root pivot_root . old-root exec chroot . sh <dev/console >dev/console 2>&1 umount /old-root Mount the new root file system over NFS from 10.0.0.1:/my_root and run init: ifconfig lo 127.0.0.1 up # for portmap # configure Ethernet or such portmap # for lockd (implicitly started by mount) mount -o ro 10.0.0.1:/my_root /mnt killall portmap # portmap keeps old root busy cd /mnt pivot_root . old_root exec chroot . sh -c 'umount /old_root; exec /sbin/init' <dev/console >dev/console 2>&1 SEE ALSO
chroot(1), mount(8), pivot_root(2), umount(8) AVAILABILITY
The pivot_root command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Linux Feb 23, 2000 PIVOT_ROOT(8)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy