Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 26 of 26
Are you prefixing your cp command with sudo? cp: cannot create directory `/media/sda2': Permission denied Do you have a directory sda2 as a sub-directory in /media? You need to do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190

    Are you prefixing your cp command with sudo?

    cp: cannot create directory `/media/sda2': Permission denied
    Do you have a directory sda2 as a sub-directory in /media?
    You need to do all this with sudo.

  2. #22
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    362
    from your blkid and looking at your media folder.
    Code:
    /dev/sda2: LABEL="newhome" UUID="23e90510-f20f-424c-8da9-73e1807d61ac" TYPE="ext2"
    Your sda2 is mounted at /meda/newhome/

    that makes command (if from the installed linux) ( if from live cd , go to NOTE:
    Code:
    sudo cp -a /home/*  /media/newhome/
    If the /ect/fstab is from running a live cd then disregard below.

    You do have a problem but I do not know why, from your media folder:
    Code:
    01606ff8-cae6-4f14-891d-b0e0f1c18bda
    that should not be there, it is your /. It might be due to your /etc/fstab has a bad entrie for /.
    Code:
    UUID=01606ff8-cae6-4f14-891d-b0e0f1c18bda /
    Mine is , you would only add the last parts.
    Code:
    UUID=ab40027f-fa4b-4dbb-b3f5-c6a6d845e959  /   ext4   errors=remount-ro 0 1 
    You may want to wait and see what "yancek" has to say, he is much more knowledgeable then me.


    NOTE:: if you are posting some info from a live cd and other from booting to the installed linux the above commands may be wrong. If it does not work , let use know how you are booting and its media folder.

    IF you are useing a live cd, and the media folder is also from the live cd, then code would be

    sudo cp -a /media/01606ff8-cae6-4f14-891d-b0e0f1c18bda/home/* /media/newhome/

  3. #23
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33

    To LostFarmer / yancek

    From installed linux:

    Code:

    Code:
    sudo cp - a /home/* /media/sda2
    Code:

    Code:
    cp: cannot stat `/home/administrator/.gvfs': Permission denied
    will try (from installed Linux):

    Code:

    Code:
    sudo cp -a /home/* /media/newhome/
    and post the results.

    -----------

    Here's the results:

    Code:
    administrator@administrator:/$ sudo cp -a /home/* /media/newhome/
    
    cp: cannot stat `/home/administrator/.gvfs': Permission denied
    
    administrator@administrator:/$
    Tried:

    Code:
    sudo rsync -av /home/* /media/newhome/
    instead, and got the following:

    Code:
    administrator@administrator:/$ sudo rsync -av /home/*  /media/newhome/
    
    [sudo] password for administrator: 
    
    sending incremental file list
    rsync: readlink_stat("/home/administrator/.gvfs") failed: Permission denied (13)
    administrator/.mozilla/firefox/5xv9v3bi.default/
    administrator/.mozilla/firefox/5xv9v3bi.default/cookies.sqlite
    administrator/.mozilla/firefox/5xv9v3bi.default/cookies.sqlite-shm
    administrator/.mozilla/firefox/5xv9v3bi.default/cookies.sqlite-wal
    administrator/.mozilla/firefox/5xv9v3bi.default/places.sqlite
    administrator/.mozilla/firefox/5xv9v3bi.default/places.sqlite-shm
    administrator/.mozilla/firefox/5xv9v3bi.default/places.sqlite-wal
    administrator/.mozilla/firefox/5xv9v3bi.default/sessionstore.js
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/_CACHE_001_
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/_CACHE_002_
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/_CACHE_003_
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/3/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/3/66/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/3/66/E305Fd01
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/4/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/4/FA/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/4/FA/86403d01
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/9/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/9/22/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/9/22/F0D74d01
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/D/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/D/16/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/D/16/42D9Dd01
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/E/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/E/A5/
    administrator/.mozilla/firefox/5xv9v3bi.default/Cache/E/A5/4AF87d01
    
    sent 14645262 bytes  received 688 bytes  9763966.67 bytes/sec
    total size is 51074993  speedup is 3.49
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
    
    administrator@administrator:/$
    Reference (can't post hyperlink):

    "Juan Valencia's website" "Synchronizing folders with rsync"
    Last edited by spurtniq; 05-14-2011 at 06:33 AM.

  4. $spacer_open
    $spacer_close
  5. #24
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    362
    1) On your post #20 , the media folder contents looks like it is from a Live cd session , is it ?

    2) Post # 23 look like from the installed linux session , is it ?

    Do not use the mix paths from a live session with the installed session, they likley will be different.

  6. #25
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33

    Re: Posts 20 / 23

    Post 20 - Mint LXDE

    Post 23 - Ubuntu 11.04 (installed Linux)

  7. #26
    Linux User
    Join Date
    Dec 2007
    Location
    Idaho USA
    Posts
    362
    If you are moveing the /home from the installed linux be sure to look at /media folder to find the correct path name.

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •