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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-12-2012, 08:41 AM
|
#1
|
Member
Registered: May 2011
Posts: 125
Rep:
|
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
|
|
|
07-13-2012, 02:26 AM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,179
Rep:
|
Which filesystem is installed on the flash drive?
|
|
|
07-13-2012, 04:24 AM
|
#3
|
Member
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719
Rep:
|
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
|
|
|
07-13-2012, 05:14 AM
|
#4
|
Member
Registered: May 2011
Posts: 125
Original Poster
Rep:
|
Thanks for reply
I fixed my issue by reformatting NTFS to ext3
Thanks
|
|
|
07-13-2012, 10:15 AM
|
#5
|
Member
Registered: May 2011
Posts: 125
Original Poster
Rep:
|
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.
|
|
|
07-13-2012, 10:42 AM
|
#6
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,179
Rep:
|
Why not FAT 32?
|
|
|
07-13-2012, 11:03 AM
|
#7
|
Member
Registered: May 2011
Posts: 125
Original Poster
Rep:
|
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
|
|
|
07-13-2012, 01:14 PM
|
#8
|
Member
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855
Rep:
|
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.
|
|
|
07-13-2012, 01:28 PM
|
#9
|
Member
Registered: May 2011
Posts: 125
Original Poster
Rep:
|
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
|
|
|
07-14-2012, 04:06 AM
|
#10
|
Member
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855
Rep:
|
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.
|
|
|
07-14-2012, 11:54 PM
|
#11
|
Member
Registered: May 2011
Posts: 125
Original Poster
Rep:
|
thanks to those who tried to help me
I resolved my issue by modifying /etc/fstab
Thanks
|
|
|
All times are GMT -5. The time now is 11:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|