Page 1 of 2
(Solved) USB 500GB drive mounts as root.
Posted: 22. Jan 2012, 00:08
by globetrotterdk
I would like to transfer some .flac files that I have ripped from some of my CDs, to a USB 500GB drive, but I am not allowed as the drive mounts as root. What do I need to do to change this behavior on my system? I am using Salix OS 13.37 LXDE.
Re: USB 500GB drive mounts as root.
Posted: 22. Jan 2012, 11:13
by laprjns
Re: USB 500GB drive mounts as root.
Posted: 22. Jan 2012, 22:53
by globetrotterdk
Here is the info that I got on the disk:
Code: Select all
# dmesg
Device Boot Start End Blocks Id System
/dev/sdb1 63 976768064 488384001 7 HPFS/NTFS/exFAT
# ls /dev/disk/by-uuid -alh
lrwxrwxrwx 1 root root 10 Jan 22 22:06 E08CEBED8CEBBBE2 -> ../../sdb1
$ ls /dev/disk/by-label -lah
lrwxrwxrwx 1 root root 10 Jan 22 22:06 Iomega_HDD -> ../../sdb1
I am thinking that I should add something like the following to the /etc/fstab file:
Code: Select all
/dev/sdb1 /media/iomega vfat noauto,users,rw
I have also noticed that /media/ contains shortcuts to directories in /mnt so I am not really sure how to go about creating directories. I had been thinking about creating a /media/iomega directory but do I also need to creat a shortcut to /mnt?
Re: USB 500GB drive mounts as root.
Posted: 23. Jan 2012, 08:50
by thenktor
globetrotterdk wrote:I would like to transfer some .flac files that I have ripped from some of my CDs, to a USB 500GB drive, but I am not allowed as the drive mounts as root. What do I need to do to change this behavior on my system? I am using Salix OS 13.37 LXDE.
It's a wrong setting in pcmanfm-mod. According to djemos this should work:
in File /usr/share/pcmanfm-mod/mount.rules
change where it says
[ntfs]
mount_options=umask=222;utf8;exec
fstype_override=ntfs-3g
to
[ntfs-3g]
mount_options=umask=222;utf8;exec
fstype_override=ntfs-3g
Please confirm. It works fine in my system.
Re: USB 500GB drive mounts as root.
Posted: 23. Jan 2012, 09:50
by globetrotterdk
Thanks for the reply. I get "permission denied" when I try to access the drive now, after having changed the settings as per the instructions.
Re: USB 500GB drive mounts as root.
Posted: 23. Jan 2012, 10:00
by thenktor
I have to check this myself at home. As workaround you can use thunar, dolphin or gtkmountman to mount the drive.
Re: USB 500GB drive mounts as root.
Posted: 23. Jan 2012, 23:19
by thenktor
Code: Select all
[ntfs-3g]
mount_options=locale=;exec
[ntfs]
mount_options=umask=022;utf8;uid=;exec
fstype_override=ntfs-3g
Try it like this.
Re: USB 500GB drive mounts as root.
Posted: 24. Jan 2012, 09:53
by globetrotterdk
OK, this is getting weird. I have made the change that you suggested. I am now able to copy over almost any directory that contains .flac files, except for those that were created with Asunder on my Salix system. Those directories and files are still rejected with a "permission denied" message.
In PCManFM, all directories and files (on my Salix system) show that I am the owner and that the files belong to the user group. All directories and files (in PCManFM) on my USB external drive are shown to be owned by root and belong to the "root" group. In sunflower-fm however, the files (and their directories) created with Asunder are shown as belonging to "mode" 0755, while the other directories and files are shown as belonging to "mode" 0700. I assume that "0755" is the root group and "0700" is the user group. The command line shows the following on my system:
Code: Select all
$ ls -l
drwx------ 4 user users 4096 Mar 26 2009 Lisa Nilsson
drwxr-xr-x 2 user users 4096 Jan 22 00:55 Mikis Theodorakis - O Zorbas 1 - Ta Pikrosavvata and One Serenade
drwx------ 4 user users 4096 Mar 26 2009 Outlandish
drwxr-xr-x 2 user users 4096 Jan 21 23:40 Various - Jackie Brown (Soundtrack)
The command line shows the following on the USB drive:
Code: Select all
$ ls -l
drwxr-xr-x 1 root root 4096 Sep 9 2010 Hootie & the Blowfish
drwxr-xr-x 1 root root 0 Sep 9 2010 Humble Pie
drwxr-xr-x 1 root root 0 Sep 9 2010 Idjah Hadidjah
drwxr-xr-x 1 root root 0 Sep 9 2010 Inul Daratista
drwxr-xr-x 1 root root 0 Sep 9 2010 Isam B
Can someone please explain what is going on?
Re: USB 500GB drive mounts as root.
Posted: 24. Jan 2012, 12:10
by mimosa
No, the '7' relates to permissions for the owner of the file, the next digit for the group, the last one for all users. So if root is the owner of the file, 700 gives no rights at all to any users other than root. Wikipedia has a good article on file permissions:
https://secure.wikimedia.org/wikipedia/ ... ermissions
See also the article linked to from there, on chmod. Actually maybe that's a better one to read first.
In this situation, you may want to make the files readable and writable for all users:
chmod a+rw foo.mp3
That will turn 0700 into 0766. 755 gives read and execute access, but not write access, to group and other users, and full access to the owner (7) - in this case, root.
Those are octal numbers, so if you think of it in binary:
r w x
7 = 1 1 1
6 = 1 1 0
5 = 1 0 1
... and so on.
EDIT That hasn't displayed properly - imagine the r w x further over, above the binary columns.
However, that doesn't solve the problem of getting it right in the first place.

Re: USB 500GB drive mounts as root.
Posted: 24. Jan 2012, 12:18
by thenktor
* Did you make the changes exactly as I've told you? Note the
umask=022 and
uid= in there. The uid options mounts the stick as user, not as root. So the files should be owned as your user, too. The umask sets the read/write permissions. You also have to remount the USB stick after doing the changes.
* 755 and 700 are is the file read/write/execution mode, not the owner. Example 755:
7 = read + write + exe allowed (4 + 2 + 1) for the owner
5 = read + exe allowed (4 + 1) allowed for group
5 = read + exe allowed (4 + 1) allowed for all
Take a look here:
http://www.tuxfiles.org/linuxhelp/filepermissions.html