(Solved) USB 500GB drive mounts as root.
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
(Solved) USB 500GB drive mounts as root.
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.
Last edited by globetrotterdk on 24. Jan 2012, 12:44, edited 1 time in total.
Military justice is to justice what military music is to music. - Groucho Marx
Re: USB 500GB drive mounts as root.
Is the drive formatted with FAT file system?
http://www.salixos.org/forum/viewtopic. ... mount+root
http://www.salixos.org/forum/viewtopic. ... mount+root
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
― George Orwell, 1984
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: USB 500GB drive mounts as root.
Here is the info that I got on the disk:laprjns wrote:Is the drive formatted with FAT file system?
http://www.salixos.org/forum/viewtopic. ... mount+root
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
Code: Select all
/dev/sdb1 /media/iomega vfat noauto,users,rw
Military justice is to justice what military music is to music. - Groucho Marx
Re: USB 500GB drive mounts as root.
It's a wrong setting in pcmanfm-mod. According to djemos this should work: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.
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.
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: USB 500GB drive mounts as root.
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.
Military justice is to justice what military music is to music. - Groucho Marx
Re: USB 500GB drive mounts as root.
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.
Code: Select all
[ntfs-3g]
mount_options=locale=;exec
[ntfs]
mount_options=umask=022;utf8;uid=;exec
fstype_override=ntfs-3g
- globetrotterdk
- Posts: 435
- Joined: 26. Oct 2010, 13:57
- Location: Denmark
Re: USB 500GB drive mounts as root.
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:The command line shows the following on the USB drive:Can someone please explain what is going on?
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)
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
Military justice is to justice what military music is to music. - Groucho Marx
Re: USB 500GB drive mounts as root.
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.
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.
* 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
* 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