LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-12-2012, 09:41 AM   #1
susja
Member
 
Registered: May 2011
Posts: 97

Rep: Reputation: 0
How to change access to flash drive?


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
 
Old 07-13-2012, 03:26 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,785

Rep: Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122
Which filesystem is installed on the flash drive?
 
Old 07-13-2012, 05:24 AM   #3
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Lightbulb

The permisions on the drive are only open for the owner. I am not familiar with that software but unless it runs with root permisions it will get denied.

Change the permisions to 770 then add yourself to the group the software is.

You would need to use sudo / su to process the commands. I have sudo in the examples below.

Code:
sudo chmod -R 770 /path/to/drive


sudo usermod -Ga plex your_user_name
 
Old 07-13-2012, 06:14 AM   #4
susja
Member
 
Registered: May 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Thanks for reply
I fixed my issue by reformatting NTFS to ext3
Thanks
 
Old 07-13-2012, 11:15 AM   #5
susja
Member
 
Registered: May 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Well I was happy to earlier
Really by changing from NTFS to ext3 I was able to modify permission but my TV box ( which I am going to use flash with ) recognize only FAT 32 or NTFS.
Well I have to format back to NTFS and again have original issue.
 
Old 07-13-2012, 11:42 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta3 on Lenovo Thinkpad W520
Posts: 6,785

Rep: Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122Reputation: 2122
Why not FAT 32?
 
Old 07-13-2012, 12:03 PM   #7
susja
Member
 
Registered: May 2011
Posts: 97

Original Poster
Rep: Reputation: 0
Originally flash came with FAT32 but it has limitations of the file size of 4Gb. That's why I used NTFS.
Now I am trying to format it on windows OS . Maybe it'll give me more options for permission change
 
Old 07-13-2012, 02:14 PM   #8
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
It is generally not recommened to use journled file system (like ext3,4)on flash drives it is better to use the non-journaled file systems (like vfat or fat32)
My 2 cents.
 
Old 07-13-2012, 02:28 PM   #9
susja
Member
 
Registered: May 2011
Posts: 97

Original Poster
Rep: Reputation: 0
I realized that I have NTFS on my flash. I reformatted it to ext3 and was able modify all permission that I needed. But the problem is that my TV box ( which I'm going to use with this flash ) does not support NTFS ( only FAT 32 and NTFS ). Well I had to reformat again to NTFS and hit the wall. Neither owner (eliya) nor root could modify anything on this flash drive?
Any ideas how to work around it?
Thanks
 
Old 07-14-2012, 05:06 AM   #10
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Fat or vfat file systems do not have any permission bits. Something is definately wrong here. What you have to do is:
1. Plug the flash drive in and check 'dmesg' to see where the flash drive has mounted.
2. Mount the flash drive - using root - "mount /dev/<device-name> /mnt/tmp" (device name is the value that comes up in dmesg eg. sda1.
3. As root you can access the flash drive using its mount point. eg "cp -rfv some-file /mnt/tmp"

This is all that needs to be done. If you want to delete that file then you have to 'cd /mnt/tmp' and look and modify all the files.
If you can do this all is good. Once this works out we can let you know how to change the permissions of the flash drive.
 
Old 07-15-2012, 12:54 AM   #11
susja
Member
 
Registered: May 2011
Posts: 97

Original Poster
Rep: Reputation: 0
thanks to those who tried to help me
I resolved my issue by modifying /etc/fstab

Thanks
 
  


Reply


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
Access Flash Drive Ace Blackwell Linux - Newbie 6 02-12-2009 11:03 PM
cannot access flash drive RIGBYREDPATH Linux - Hardware 1 09-06-2006 10:36 AM
Access USB flash drive? Zeno McDohl Linux - Newbie 4 01-16-2006 01:47 PM
new user- can't access my flash drive kebi Linux - Software 1 08-17-2005 12:04 PM
How to access a USB flash drive captainpicard Linux - Hardware 1 04-20-2003 01:19 PM


All times are GMT -5. The time now is 02:32 AM.

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