Re: Copy files without changing ownership and permissions

From: Anthony E. Greene (agreene_at_pobox.com)
Date: 11/27/04

  • Next message: AA: "tuning synaptic touchpad?"
    Date: 26 Nov 2004 22:49:12 -0800
    
    

    thegodorange <orange@comcast.net> wrote in message news:<Aovnd.360335$wV.249506@attbi_s54>...
    > Ross wrote:
    > > Hi there,
    > > My Linux file server has an ext3 partition for user's home directories. I
    > > have just added a new and big ext3 partition.
    > > I (root) would like to copy (cp) all users' files to the new partition. But
    > > any files copied to the partition will change their ownership to root, and
    > > permission to 755.
    > > How can I keep their ownership and permissions?
    > > Thanks in advance,
    > > Ross
    > >
    > >
    > look into the cp -a option
    > for example, cp -a /home /newhome

    The problem I have with cp is that you don't get hidden files/dirs.
    tar is intended to do what is needed here.

    -- 
    Tony
    

  • Next message: AA: "tuning synaptic touchpad?"

    Relevant Pages

    • Re: Adding a new hard drive
      ... mounted as the file-system will have an ownership of root.root. ... In the OP's case, he's wanting all the drive as his home directory, so ... you cp -a /home, as a separate partition, the partition is owned by ... At this point, you are root, and in /root. ...
      (alt.os.linux.suse)
    • Re: Adding a Hard Drive
      ... > partition is then put in its place with its own permissions, ownership, etc ... > allows any user to mount the partition, but it also allows ANY user OTHER ... I presumed that mounting in /home/art/mnt, you wanted the contents of the root ...
      (uk.comp.os.linux)
    • Re: Problems with mounting vfat in Debian
      ... > partition is mounted the ownership has changed 2 root. ... A vfat partition doesn't have the ability to set permissions the way Linux ...
      (Debian-User)
    • Re: Copy files without changing ownership and permissions
      ... > Ross wrote: ... >> any files copied to the partition will change their ownership to root, ... >> How can I keep their ownership and permissions? ...
      (linux.redhat)
    • Re: FC3: Problems with mounting USB harddisk
      ... Only root ... >> is alowed to read AND write to the partition. ... the ownership is changed automatically to the user who mounted ... mounted ext3 partition not ajusted to the id of the mounting user? ...
      (Fedora)