usb0 Fat32 drive owned by root - read only
|
14th Dec, 2012, 12:39 PM
Post: #1
|
|||
|
|||
usb0 Fat32 drive owned by root - read only
Hello, I am new to LINUX so please excuse my ignorance - I'm only being so forward as to post because I am trying to configure a PI as a Christmas Present and am running out of time! (And if you are wondering, I'm going with the Alpha/Frodo version because it has better Karaoke support.)
I am using Alpha 3 and the attached fat32 usb drive is owned by root:root which, as I understand it, means that the xbian user cannot write to it. I noticed this when trying to run the XBMC backup settings addon targeted at the usb drive. The xbmc log file returns an error when trying to make directories. It is the same for the xbian user on ssh. I am guessing that this is an oversight and not the desired default behavior? Apologies if this is already a known issue - I did spend an age trying to find an xbian reference to the problem, but couldn't see anything. There's obviously advice out there in the ether about how to mount drives, but if I attempt my own fix it won't last past the next install. Rachel |
|||
14th Dec, 2012, 12:55 PM
Post: #2
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
login via ssh
# sudo chmod 0777 -R /media/usb* should do it. there are other ways depending on what you are trying to accomplish. |
|||
14th Dec, 2012, 06:53 PM
Post: #3
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
(14th Dec, 2012 12:55 PM)DraZtiK Wrote: login via ssh Thanks for the quick reply. I thought that your fix was working this morning, but it turns out that after only three hours sleep I had forgotten that I had removed the usb flash drive, and so media/usb wasn't mapped to the relevant Fat32 usb drive! [I need to find out where it was mapping to on the SD card so I can remove those test directories!] So the sudo chmod doesn't work. I was sudo chmoding and chowning my little heart out yesterday before posting, but to no avail: couldn't change usb0 from drwxr-xr-x root:root. Chown comes back with "Operation not permitted". I get the idea from other posts that the permissions are being ignored because Fat32 isn't set up for linux permissions, and the question of who can read or write to the drive comes down to a question of ownership at the time when the drive is mounted. Any other thoughts? Thanks again, Rachel |
|||
14th Dec, 2012, 09:42 PM
Post: #4
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
Can you try:
*This is a single (one line) command* Code: sudo sed -i 's/FS_MOUNTOPTIONS="dmask=0777,fmask=0777"/FS_MOUNTOPTIONS="uid=xbian,gid=xbian,dmask=0777,fmask=0777"/g' /etc/usbmount/usbmount.conf This should make all usb drives not only read/writable/executable but also owned by xbian:xbian. PS. i did some cleaning up... pilight - modular domotica solution
|
|||
14th Dec, 2012, 09:49 PM
Post: #5
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
(14th Dec, 2012 09:42 PM)CurlyMo Wrote: Can you try: Thanks, but after running the command all the usb drives are still showing root:root. |
|||
14th Dec, 2012, 09:58 PM
Post: #6
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
To summaries things, you say none of these properties work on your usb drive? The user:group isn't automatically set to xbian:xbian, and the permissions aren't automatically set to 0777?
pilight - modular domotica solution
|
|||
14th Dec, 2012, 10:16 PM
Post: #7
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
(14th Dec, 2012 09:58 PM)CurlyMo Wrote: To summaries things, you say none of these properties work on your usb drive? The user:group isn't automatically set to xbian:xbian, and the permissions aren't automatically set to 0777? Yes (though the logical directory usb is 0777). Here's the listing for /media after updating the usbmount.conf to FS_MOUNTOPTIONS="uid=xbian,gid=xbian,dmask=0777,fmask=0777" as suggested above (and rebooting). lrwxrwxrwx 1 root root 4 Nov 11 17:18 usb -> usb0 drwxr-xr-x 8 root root 16384 Jan 1 1970 usb0 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb1 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb2 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb3 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb4 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb5 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb6 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb7 |
|||
14th Dec, 2012, 11:43 PM
Post: #8
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
Can you replace the FS_MOUNTOPTIONS line with:
Code: FS_MOUNTOPTIONS="-fstype=ntfs,gid=xbian,uid=xbian,umask=0 \ Should work now. pilight - modular domotica solution
|
|||
15th Dec, 2012, 12:00 AM
Post: #9
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
(14th Dec, 2012 11:43 PM)CurlyMo Wrote: Can you replace the FS_MOUNTOPTIONS line with: That does indeed work - my hero! Is it expected that a listing of /media should still show root ownership of the logical directory etc (usb0 is the only drive plugged in, and is now owned by xbian)? lrwxrwxrwx 1 root root 4 Nov 11 17:18 usb -> usb0 drwxrwxrwx 8 xbian xbian 16384 Dec 14 13:52 usb0 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb1 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb2 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb3 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb4 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb5 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb6 drwxrwxrwx 2 root root 4096 Nov 11 17:18 usb7 And will this change of the config file be standard in the future? Thanks so much for your patient and speedy help, Rachel |
|||
15th Dec, 2012, 12:04 AM
Post: #10
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
No need to 'say' thanks, we have a button for that now , but your welcome. I'm committing this fix now.
pilight - modular domotica solution
|
|||
23rd Jan, 2013, 03:46 AM
Post: #11
|
|||
|
|||
RE: usb0 Fat32 drive owned by root - read only
Sorry for bringing this topic up again, but I've got a similar problem with my HFS+ USB HDD.
My usbmount.conf looks like: Code: ... Code: xbian@xbian:/media# ls -all EDIT: After re-reading the post, I'm not sure, wether rhwaughs question was Mount related, or just permissions. Looks to me, like my drive is mounted ro, but I don't know why. chmod brings: Code: chmod: changing permissions of `/media/usb0/xbmcTR.repo_.zip': Read-only file system EDIT2: After playing around a bit, I definetely now, the issue is not directly usbmount related. When I plugin another usb drive (exFat) it is recognized, mounted with xbian:xbian and rw. If I plug in my HFS+ formatted HDD, it's mounted, but strangely with 99:99 as user and group. Also, it seems to be mounted as ro. Is there any possibility changing this? EDIT3: OK, fixed the mounting problems I think. Last Problem is, that there are some permission issues left. I chmodded whole media directory and it now it finally works. I think hfsplus, hfsprogs and hfsutils should be included in xbian, as this seemed to be the issue which prevented usbmount from mounting the HFSPLUS partition in rw. |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[SOLVED] Should /run/rpcbind be owned by xbian | deckoff | 2 | 9,411 |
15th Aug, 2013 03:08 PM Last Post: deckoff |