[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to override fuse args to ntfs-3g to set permissions?



On 26/11/14 11:41, Rick Macdonald wrote:
> On 25/11/14 04:04 PM, Scott Ferguson wrote:
>> On 26/11/14 08:03, Rick Macdonald wrote:
>>> Well, many hours of googling, and running grep on my entire 
>>> filesystem, have failed me this time.
>>> 
>>> I'm running up-to-date wheezy.
>> DE?
> 
> Sorry, I don't know what DE means!

Desktop Environment e.g. GNOME, KDE, XFCE, LXDE, etc


Probably irrelevant now - given your requirements (Plex) and your stated
usage (only user) the fstab I've suggested solve the mounting
requirement. Please note that I can't test this for you.

Understanding fuse/ntfs-3g? See the ref to the documentation at the
bottom of this post. It's not the easiest read but it may answer your
question.

<snipped>

>>> I can mount it manually by adding the following entry to fstab 
>>> (which somehow inhibits the automount), but I'd much rather have 
>>> it auto mount whenever I plug it in. LABEL=WinBackup 
>>> /media/WinBackup ntfs 
>>> rw,nosuid,nodev,uhelper=udisks,allow_other,nonempty,relatime,default_permissions,blkdev,umask=0000
>>> 0 0
>>> 

>> What does "allow_other" do?
> 
> allow_other (man mount.fuse)

Yes.
In inadvertently rhetorical question. I 'should' have asked "did you
apply the changes to the fuse conf to allow that option to work?" My
apologies (I can be a bit thick).

<snipped>

> You'd think that's all I need,

Agreed

> but it's already on the mount command line. The problem seems to be 
> the dmask & fmask values restrict access regardless.

No. You need to uncomment line 9 in /etc/fuse.conf so that allow_user
will work in your fstab (from not-to-be relied on memory - it still
won't allow a non-root user to umount the device).
This is the line you need to uncomment:-
#user_allow_other

Read on for a step-by-step guide on what's required.

> 
>> Why "umask=0000" (instead of 0022)? Why not 
>> "uid=$username,gid=users"
> 
> All the options were copied from the mount options in the syslog 
> above. I removed the ones that mount didn't like (blkdev and
> fsname). I wanted to start with what (I think) fuse is giving ntfs-3g
> on it's command line (not that that's a valid thing to do).
> 
> "fuse" doesn't seem to be a binary executable, and I can't find where
> these command line args are coming from when mount is called.
> 
> 
>> 
>> Do you want to retain and use standard Windows permissions? How 
>> many people will need access to the disk?
>> 
> 
> Nobody else uses the machine, but I need the permissions opened up.


In which case I'd "recommend":-
*1.* uncommenting the user_allow_other line in /etc/fuse.conf

*2.* changing the fstab line to:-
LABEL=WinBackup /media/WinBackup ntfs-3g
uid=1000,gid=1000,permissions,auto,noatime 0 0

*3.* check that you are a member of the "disk" group (as a "user":-
groups |grep disk
if you aren't, become one (as "root")[*1]:-
gpasswd -a $YourUsername disk

[*1] "groups" won't show your changed group membership until after
you've logged out, and logged back in. You can use the following if you
need to double-check:-
grep disk /etc/group


> When my WinXP server died I moved my videos to my Linux desktop. I 
> usually use Serviio but thought I'd give Plex a try (Plex doesn't 
> support XP so I couldn't give it a try until now). Plex runs as user 
> "plex" and cannot read any of the files on this USB disk when mounted
> under my account with mode 600 permissions. Plex has an option to let
> the client delete videos, so while testing I chose 0000. I could tell
> Plex to run as me, but that's no good because its files are installed
> under /var/lib/plexmediaserver, and if I change the ownership of
> those it would likely break upgrading Plex when the next deb file is
> released.

Thanks - I've made the above suggestions with that in mind.

> 
> Rick
> 
> 

Useful refs:-
http://www.tuxera.com/community/ntfs-3g-faq/#unprivileged


Kind regards

--
"Don't be smart, you dunno wot you're saying" ~Snortle La Darse 90-250-400


Reply to: