Solved How to change access to flash drive ?

July 12, 2012 at 06:39:20
Specs: Ubuntu 12.04, 1/2000
Hello,
I'm using Plex Media Server and provide path to Videos folder to scan. Now I started to use flash drive as well and added the path to flash drive to scan as well. I realized that it failed to scan flash. Log shows this error:
Jul 08, 2012 20:27:29 [0xb7750700] DEBUG - Scanning USB with 0 current items in the database...
Jul 08, 2012 20:27:29 [0xb7750700] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jul 08, 2012 20:27:29 [0xb7750700] DEBUG - * Scanning /media/62744BA250E521E0
Jul 08, 2012 20:27:29 [0xb7750700] WARN - Caught exception while scanning USB: boost::filesystem::directory_iterator::construct: Permission denied: "/media/62744BA250E521E0"
The user running Plex is plex:
# id plex
uid=115(plex) gid=127(plex) groups=127(plex)
Permission on flash:
eliya@Linda:/media/62744BA250E521E0$ ls -ld .
drwx------ 1 eliya eliya 4096 Jul 8 10:46 .
I added user 'plex' to group 'eliya' but I can't modify group access for flash using chmod
I tried to share flash drive but it didn't help me.
I also tried to play with this flash on Windows machine and granted 'Full' access to everyone but back on Linux it didn't make any difference.
My question: how could I grant user 'plex' access to scan /media/62744BA250E521E0 ?
Thanks

See More: How to change access to flash drive ?

Report •


✔ Best Answer
July 14, 2012 at 03:38:15
The mount /remount command should have made this at runtime.
If you simply give the mount command at a terminal console, and then login as user plex, you should be able to figure out, whether it works.

If it's working, you can make the changes to /etc/fstab.



#1
July 12, 2012 at 14:30:58
Maybe you need read/write access rights on the flash drive.
Check how it is mounted by using the mount command.
If it's not mounted with RW rights, you might want to remount it:
mount -o rw,remount /dev/you_flash_device /media/you_folder_for_flash_device

Maybe that helps


Report •

#2
July 12, 2012 at 16:14:12
If plex is the actual user (be it real or some computer generated user) then the user needs to be granted removable storage. I am not fully sure where ubuntu let's root change users but there should be some permissions like storage. Ubuntu may be as paulsep says in that the only authentication to drives is by the mount command.

Google is evil


Report •

#3
July 13, 2012 at 11:23:48
thanks paulsep,
I tried your method but it didn't make a difference.
Thanks

Report •

Related Solutions

#4
July 13, 2012 at 11:26:22
thanks jefro,
plex is a real user, it was generated when I install Plex Media Server and that user runs that server.
Until I'll grant read access to 'plex' to access flash drive I can't do anything ....
But currently have no idea how to work around it.
Thanks,

Report •

#5
July 13, 2012 at 14:53:04
Have you tried to logon with the user plex in at a console prompt and checked, what you get on the flash drive?
Can you do ls -l on that drive and it's subfolders and get the list of files stored in there?

Report •

#6
July 13, 2012 at 20:12:15

Report •

#7
July 13, 2012 at 21:28:58
Thanks for reply.
When I login as 'plex' and try to list directory on flash I've got 'Permission denied' error which is expected since this user doesn't have read permission .
After I 'google' a little bit more this issue I realized that NTFS on Linux won't allow any permission changes, the only option might be change mount option in fstab.
I am going to play with it tomorrow .
Thanks

Report •

#8
July 14, 2012 at 03:38:15
✔ Best Answer
The mount /remount command should have made this at runtime.
If you simply give the mount command at a terminal console, and then login as user plex, you should be able to figure out, whether it works.

If it's working, you can make the changes to /etc/fstab.


Report •

#9
July 14, 2012 at 21:50:48
thanks to those who tryied to help
I resolved the issue myself by modifying /etc/fstab file.
Thanks

Report •


Ask Question