Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-02-2010, 09:13 PM   #1
LQ Newbie
Registered: Jun 2008
Distribution: Arch, Manjaro, PCLOS
Posts: 20

Rep: Reputation: 1
Unable to own previously saved /home files on new external USB drive

I have just had to reinstall my OS (Sabayon) onto a new and larger hard drive (dying old disk). I quickly saved all my old docs in /home on an external USB drive (formatted and then created an ext4 file system) before the swap and installation.

After getting the new disk running I connected the USB external disk. First I could not access the drive at all, but that seems to be fixed. Now I want to bring all my files back to my new /home folder but apparently they (especially the former MS Office .doc, .xls, etc files, not so much the OpenOffice files) are “read only” and I don't have permissions anymore.

I am able to create directories on the external, and can move files back and forth, but don't seem to own many of them.

Sabayon automatically mounted my external disk in /media/disk, rather than /mnt, so I've left that alone for now.

After searching here and elsewhere for info, I tried a few things (below):

For access I added a line to /etc/fstab:
/dev/sdb1   /media/disk   ext4   noauto,rw   0   0
Here's what I've done to try and fix ownership already:

in /media I:
# chmod 775 disk
which gives output of:

media # ls -l
 total 4
 drwxrwxr-x 2 root root 4096 Nov  1 21:30 disk
and then tried

# chown -R tonyawards disk
(there is just me as a user on the computer, no groups)
no luck, so then I

# chown g+rwxs disk
although I don't really know what set-UID does...

It now reads:

media # ls -l
 total 4
 drwxrwsr-x 2 root root 4096 Nov  1 21:30 disk
I thought that the “-R” would give full access to all directories and their files as an owner, therefore allowing me to modify them at will. But apparently not.

I'm not sure what the “total 4” refers to since there is only the one directory “disk” inside /media but I assume that's not part of this issue... Does adding umask=0 have anything to do with this, and if so where does that go?

Hopefully this is all clear to someone – Linux is still pretty new to me. What am I missing/doing wrong? Please tell me that it's possible to change these files so I can “own” them again.

Thank you all. Any other output you might need, please let me know.
Old 11-03-2010, 12:49 AM   #2
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Hi Tonyawards

I'm not familiar with Sabyon but some ideas to try.

In /etc/fstab you're showing a mount point of /media/disk but elsewhere you just show disk. Try changing the chown to point at /media/disk (make sure it exists before issuing the command). Thr -R option does recurse from the specified directory to the subdirectories.

Try copying the files to their final destination and then performing the chown.

Old 11-03-2010, 03:35 AM   #3
Registered: Jun 2010
Distribution: Ubuntu, played with Puppy Slitaz & OpenSUSE
Posts: 40

Rep: Reputation: 4

The "total 4" line gives the size in blocks of the files and directories listed.
If you want a more friendly line add h to parameters for ls
ls -lh
Old 11-03-2010, 03:46 AM   #4
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103

Try -->

chown -R tonyawards /dev/sdb1

If your mount point is incorrect this will change it directly.

You can also run mount and see where the drive is at. The re run the command.Example below->


joe@Tux-Box ~ $ mount

/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
/dev/sda1 on /boot type ext4 (rw,commit=0)
/dev/sdb1 on /media/N-Space type ext4 (rw,commit=0)
/dev/sdc1 on /media/DDD-Show type ext4 (rw,commit=0)
/dev/sdd1 on /media/E-Space type ext4 (rw,commit=0)

Old 11-03-2010, 11:13 PM   #5
LQ Newbie
Registered: Jun 2008
Distribution: Arch, Manjaro, PCLOS
Posts: 20

Original Poster
Rep: Reputation: 1
jv2112, I ran mount and got what seems to me to be an odd result on the last line. It's sure not what you have in your various /media locations.
# mount
rootfs on / type rootfs (rw)
/dev/sda1 on / type ext4 (rw,commit=0)
proc on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime)
/dev/sda2 on /home type ext4 (rw,commit=0)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
nfsd on /proc/fs/nfsd type nfsd (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sdb1 on /media/disk type ext4 (rw,noexec,nosuid,nodev,user=spike)
Does noexec mean what I think it might mean in that last line for sdb1, and if so, how do I fix these settings to make them correct for what I need? My /home and root on sda2 and sda1 are the only ones that are set as yours are, eg: (rw,commit=0).

tommyttt - my mount point is in /media/disk; I just grabbed part of my terminal output while I was in my /media directory. I re-did it to make sure (~# chown -R tonyawards /media/disk), but the file permssions are remaining read-only. When I bring a file over to my Desktop the permissions stay the same and it remains a read-only file.

And martinbc, thanks for that clarification on the totals number.

I just ran a ls -l in /dev to have a look, and without posting it all, some entries also seem strange:

drwxr-xr-x  5 root  root       100 Nov  3 18:47 disk
 - and -
lrwxrwxrwx  1 root  root         4 Nov  3 18:47 root -> sda1
lrwxrwxrwx  1 root  root         4 Nov  3 18:47 rtc -> rtc0
crw-rw----  1 root  root  254,   0 Nov  3 18:47 rtc0
lrwxrwxrwx  1 root  root         3 Nov  3 18:47 scd0 -> sr0
brw-rw----  1 root  disk    8,   0 Nov  3 18:47 sda
brw-rw----  1 root  disk    8,   1 Nov  3 18:47 sda1
brw-rw----  1 root  disk    8,   2 Nov  3 18:47 sda2
brw-rw----  1 root  disk    8,   3 Nov  3 18:47 sda3
brw-rw----  1 root  disk    8,  16 Nov  3 18:56 sdb
brw-rw----  1 spike disk    8,  17 Nov  3 18:56 sdb1
Are these normal permissions or does disk seem odd as a 755 when I gave it a 775 permission (I thought, with chmod)?

Thanks everyone, for all the detailed suggestions so far, and for any others you may have... I'm still at a bit of a loss here.
Old 11-04-2010, 02:04 AM   #6
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 17.3+18.3, MX-17
Posts: 4,177

Rep: Reputation: Disabled
/dev/sdb1 on /media/disk type ext4 (rw,noexec,nosuid,nodev,user=spike)
I'd suggest you delete that entry...

Last edited by JZL240I-U; 11-04-2010 at 02:05 AM.
Old 11-04-2010, 04:10 AM   #7
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103

I am a little stumped. Did you SU/Sudo (I am not familiar w/ your distro) when you chmod ?
Old 11-09-2010, 09:16 PM   #8
LQ Newbie
Registered: Jun 2008
Distribution: Arch, Manjaro, PCLOS
Posts: 20

Original Poster
Rep: Reputation: 1
jv2112, yes I was in 'su' when I tried these changes, but still it was not working.

I had to rename each master directory in my /home file system on the external drive one by one, just slightly, in order to be able to chmod -R the permissions to 775 on all. I also had to remove any spaces from the directory names, which I have never have had to do before (dog food to dog_food etc). When they were finally done they would then copy over to my new installed hard drive and went into /home with no trouble.

Now on the new installed drive, all directories are at 755 and files inside have remained at 775. This seems fine for now (I'm the only one with access to this box) until I am sure all is ok, then I'll reduce permissions just for safety's sake.

JZL240I-U, thanks for the catch – I did change that entry from spike to tonyawards (older user) first, but it still did not allow me to do what I mentioned above.

I wish I had a more elegant fix to report here, but this did at least work. So I'll mark this as solved, and thank you all for your time and input.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me use a external USB drive for my /home directory spydyee Linux - Hardware 13 01-20-2010 06:17 AM
Unable to Copy Files To External Hard Drive rvijay Linux - General 17 07-18-2009 10:42 AM
How do I unsave a Gnome-saved password of my ext3 external USB hard-drive? simonsharry Linux - Newbie 5 02-15-2009 02:15 AM
How to mount Western Digital External Drive previously used on Windows System? bliss4one MEPIS 7 09-16-2008 05:59 PM
Unable to write to external USB drive m_lp_ql_m Linux - Newbie 2 08-29-2005 03:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration