Re: [off list] Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-24 Thread Brian
On Tue 22 Nov 2016 at 17:51:56 +, Brian wrote:

> On Tue 22 Nov 2016 at 08:38:55 -0600, Richard Owlett wrote:
> 
> > On 11/21/2016 11:15 AM, David Wright wrote:
> > >Disclaimer: I have no idea what the subject of this thread is about.
> > 
> > 
> > If I was going on only on the responses to my post starting this sub-thread
> > I would wonder myself ;/
> 
> Forgetting about the subject line, the content of the thread starter is
> essentially: you want to plug a USB stick into your Debian machine and
> want totally unfettered read/write access when logged in as user.
> 
> I'll repeat part of the content of another post:
> 
>  > You have USB stick which is formatted FAT16 (say). I'd expect after
>  > plugging it into your Debian machine 'lsblk' would show the device
>  > and its partitions. Does this happen?
>  >
>  > Then something like
>  >
>  >   pmount sdg1
>  >
>  > would put the mount point as /media/sdg1. Does this happen?
> 
> Two questions requiring only a "yes" or "no" response.
> 
> If you do not mind, a third question. Do you now have totally unfettered
> read/write access to /media/sdg1 as a user?

The post above was intended to act as an incentive for you to haul
yourself out of the hole you have dug for yourself.

There is no doubt about the answers to the first two questions being
"yes". Any doubt about the third question having "yes" as a response
can easily be tested.

-- 
Brian.



Re: [off list] Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-22 Thread Brian
On Tue 22 Nov 2016 at 08:38:55 -0600, Richard Owlett wrote:

> On 11/21/2016 11:15 AM, David Wright wrote:
> >Disclaimer: I have no idea what the subject of this thread is about.
> 
> 
> If I was going on only on the responses to my post starting this sub-thread
> I would wonder myself ;/

Forgetting about the subject line, the content of the thread starter is
essentially: you want to plug a USB stick into your Debian machine and
want totally unfettered read/write access when logged in as user.

I'll repeat part of the content of another post:

 > You have USB stick which is formatted FAT16 (say). I'd expect after
 > plugging it into your Debian machine 'lsblk' would show the device
 > and its partitions. Does this happen?
 >
 > Then something like
 >
 >   pmount sdg1
 >
 > would put the mount point as /media/sdg1. Does this happen?

Two questions requiring only a "yes" or "no" response.

If you do not mind, a third question. Do you now have totally unfettered
read/write access to /media/sdg1 as a user?

-- 
Brian.




Re: Coercing sane file permissions -- site specific

2016-11-22 Thread Greg Wooledge
On Tue, Nov 22, 2016 at 09:38:04AM -0600, Richard Owlett wrote:
> On 11/22/2016 9:16 AM, Greg Wooledge wrote:
> >Intermediary agents to mount file systems on behalf of an end user
> >generally fall into two categories:
> >
> >  * Automounters.
> See above.

Do you mean THIS PART?

> >>>differs by a single mouse click. And actually, I didn't deduce that
> >>>automounting was what the OP wanted,
> >>
> >>It is explicitly what I do not want.

That sure as hell looks like a blanket rejection of automounting
technologies to me.

> >  * Desktop environment specific tools.
> I have stated that I use Mate D.E.

And?

> >Yet, you seem to be rejecting both of these.
> I never said so.

STOP REPLYING WITH NEGATIONS THAT LEAVE ME WITH NO CLUE WHAT YOU WANT

What do you want?



Re: Coercing sane file permissions -- site specific

2016-11-22 Thread Lisi Reisz
On Tuesday 22 November 2016 15:38:04 Richard Owlett wrote:
> On 11/22/2016 9:16 AM, Greg Wooledge wrote:
> > On Tue, Nov 22, 2016 at 09:09:01AM -0600, Richard Owlett wrote:
> >> On 11/21/2016 12:43 PM, Joe wrote:
> >>> While this does not actually constitute automounting, I suggest that it
> >>> differs by a single mouse click. And actually, I didn't deduce that
> >>> automounting was what the OP wanted,
> >>
> >> It is explicitly what I do not want.
> >> I said in
> >> https://lists.debian.org/debian-user/2016/11/msg00838.html :
> >> "...
> >> This has me wondering if the objectionable reaction was *before*
> >> OR *after* having run
> >>
> >>   gsettings set org.mate.media-handling automount false"
> >
> > OK, this is just way too confusing and convoluted for me.
>
> Please note the subject line of
> ...debian-user/2016/11/msg00838.html began "MURPHY'S LAW RULES".
> It detailed observations. It noted that system had begun acting
> as desired. It obviously implied that I was about to do some
> testing to find out why. I did after all ASK if there was a
> logging tool that met stated criteria.
>
> > [snip]
> > Intermediary agents to mount file systems on behalf of an end user
> > generally fall into two categories:
> >
> >   * Automounters.
>
> See above.
>
> >   * Desktop environment specific tools.
>
> I have stated that I use Mate D.E.
>
> > Yet, you seem to be rejecting both of these.
>
> I never said so.

Richard - much of the problem is that your frame of reference is, by your 
own - boasted?? ;-) - admission somewhat idiosyncratic.  You are somewhat 
difficult to follow. 

Moreover, in spite of your saying that you believe that your emails will help 
other people, 1) they probably don't understand them and 2) even if they 
understand them, the chance that they have exactly the same problem is 
vanishingly small, given that you insist on circumscribing everything in ways 
that most of us find eccentric at best and utterly bizarre at worst.

Lisi



Re: Coercing sane file permissions -- site specific

2016-11-22 Thread Richard Owlett

On 11/22/2016 9:16 AM, Greg Wooledge wrote:

On Tue, Nov 22, 2016 at 09:09:01AM -0600, Richard Owlett wrote:

On 11/21/2016 12:43 PM, Joe wrote:

While this does not actually constitute automounting, I suggest that it
differs by a single mouse click. And actually, I didn't deduce that
automounting was what the OP wanted,


It is explicitly what I do not want.
I said in
https://lists.debian.org/debian-user/2016/11/msg00838.html :
"...
This has me wondering if the objectionable reaction was *before*
OR *after* having run

  gsettings set org.mate.media-handling automount false"


OK, this is just way too confusing and convoluted for me.


Please note the subject line of 
...debian-user/2016/11/msg00838.html began "MURPHY'S LAW RULES". 
It detailed observations. It noted that system had begun acting 
as desired. It obviously implied that I was about to do some 
testing to find out why. I did after all ASK if there was a 
logging tool that met stated criteria.


[snip]
Intermediary agents to mount file systems on behalf of an end user
generally fall into two categories:

  * Automounters.

See above.



  * Desktop environment specific tools.

I have stated that I use Mate D.E.



Yet, you seem to be rejecting both of these.

I never said so.



Re: Coercing sane file permissions -- site specific

2016-11-22 Thread Greg Wooledge
On Tue, Nov 22, 2016 at 09:09:01AM -0600, Richard Owlett wrote:
> On 11/21/2016 12:43 PM, Joe wrote:
> >While this does not actually constitute automounting, I suggest that it
> >differs by a single mouse click. And actually, I didn't deduce that
> >automounting was what the OP wanted,
> 
> It is explicitly what I do not want.
> I said in 
> https://lists.debian.org/debian-user/2016/11/msg00838.html :
> "...
> This has me wondering if the objectionable reaction was *before* 
> OR *after* having run
> 
>  gsettings set org.mate.media-handling automount false"

OK, this is just way too confusing and convoluted for me.

I was one of the people (there were more than one) who concluded that
you might be looking for an automounting solution.  Perhaps we were
wrong.

But in that case, what *DO* you want?  You've been told repeatedly that
it is not possible to mount a file system without root privileges at
some point in the chain of processes.  Meanwhile, you insist that you
want a solution that allows you to do this as "any user", which is
flatly impossible unless there is some daemon or other intermediary
process to arbitrate the elevated privileges for you.

Intermediary agents to mount file systems on behalf of an end user
generally fall into two categories:

 * Automounters.

 * Desktop environment specific tools.

Yet, you seem to be rejecting both of these.

So, what do you want?



Re: Coercing sane file permissions -- site specific

2016-11-22 Thread Richard Owlett

On 11/21/2016 12:43 PM, Joe wrote:

[snip]

While this does not actually constitute automounting, I suggest that it
differs by a single mouse click. And actually, I didn't deduce that
automounting was what the OP wanted,


It is explicitly what I do not want.
I said in 
https://lists.debian.org/debian-user/2016/11/msg00838.html :

"...
This has me wondering if the objectionable reaction was *before* 
OR *after* having run


 gsettings set org.mate.media-handling automount false"


 I said that it was what *I* had
working. The point was to demonstrate that software existed to do the
job the OP wanted done, even if I didn't see quite what software that
was.





[off list] Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-22 Thread Richard Owlett

On 11/21/2016 11:15 AM, David Wright wrote:

Disclaimer: I have no idea what the subject of this thread is about.



If I was going on only on the responses to my post starting this 
sub-thread I would wonder myself ;/


[snip]


Well, I know what my expectations are: to see an idiosyncratic problem
posed (it SHALL do this and that) and then see people slapped down for
not sticking to the precise conditions spelled out or implied by the OP,
should they make a suggestion that is probably more useful to others
having a similar (but not absolutely identical) problem.


I'm in close to a "no win" situation on this forum.
I have in the past been taken to task for being detailed enough.
When asking a very narrowly focused "How do I do ..." question I 
tend to get

one of two responses:
  1. "You should not want to do *THAT*."
  2. The respondent explicitly ignores inconvenient details of 
what I wrote:


An example in this sub-thread is the my supposed interest in 
auto-mounting.

To quote myself [1]:

This has me wondering if the objectionable reaction was *before* 
OR *after*

having run

 gsettings set org.mate.media-handling automount false

Then all the discussion depending on my presumed desire to 
automount :<




The usefulness of many suggestions is limited, of course, by the OPs
insistence that a horse and cart is driven through the unix security
model merely because the OP never connects anything to the internet
(which is insane).


I do not understand that sentence.
I have a used laptop explicitly purchased to use as "laboratory 
device".
It is intentionally isolated as much as possible from any outside 
action.

There *EXACTLY* TWO things that can affect what I observe:
  1. What is internal to an un-updated copy of Debian 8.6.0 
using MATE.

  2. I myself do to the system.
I obviously do connect to the internet. JUST not via THAT system ;/

[snip]


As the OP always declares a desire to learn more, then it might be
appropriate to suggest writing a script running under root which
watches for any /dev/sd* devices to pop up, creates mount points,
appends lines to /etc/fstab (umask = 0, of course) and mounts them.
The script could sleep and loop or be run under cron.


Philosophically I agree, although I've not gone that route on 
this problem.

See the next to last sentence of [1].

[snip]


One could always reboot or, in the OP's case, reinstall Debian :)


I do so frequently enough to be accumulating a slew of 
preseed.cfg files.


[snip]


I'm not sure why the OP would want DE solutions. If you want to learn
how to troubleshoot car engines, you start with an old car, not with
one where about the only thing you can do when you lift the bonnet is
find that there's just room to plug into the computer diagnostic
socket (if that's where they go).


Why a DE? For the same reason I've driven cars with automatic 
transmissions - it's more convenient. That state of Missouri 
recently declared that I MUST only drive cars with automatic 
transmissions. Traumatic spinal cord injuries can be a nuisance 
.


Debian Linux is a tool. To use it effectively and conveniently, I 
occasionally have to delve into the realm of unintended consequences.



[1] https://lists.debian.org/debian-user/2016/11/msg00838.html



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread rhkramer
On Monday, November 21, 2016 02:39:04 PM Brian wrote:
> On Mon 21 Nov 2016 at 18:43:20 +, Joe wrote:
> > On Mon, 21 Nov 2016 17:36:19 +
> > 
> > Brian  wrote:
> > > Someone deduced "He wants auto-mounting of the inserted media". The
> > > evidence isn't there. Putting one's self in the a user's position is
> > > one thing; putting words into his mouth is another.

From the original post:


I use fat16 and fat32 formatted USB flash drives for EXACTLY 
ONE purpose.
It is to transfer data to/from a Windows machine.
There is NO [nor will there ever be] a network connection between 
them.

When I plug one into my Debian machine I want totally unfettered 
read/write access.
[when logged in as root or ANY user ID]


HOW?
{any one notice a tone of frustration ;/}


I don't see any mention of mounting, thus I conclude he doesn't expect to 
mount, i.e., he expects automount.

(When does he expect unfettered access?  When he plugs one into his machine,  
not after he mounts it.)

(Aside: I should probably avoid posting when I have a significant (or maybe 
any) headache...--I apparently get grouchy ;-)



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Brian
On Mon 21 Nov 2016 at 18:43:20 +, Joe wrote:

> On Mon, 21 Nov 2016 17:36:19 +
> Brian  wrote:
> 
> > Someone deduced "He wants auto-mounting of the inserted media". The
> > evidence isn't there. Putting one's self in the a user's position is
> > one thing; putting words into his mouth is another.
> 
> The requirement was for a non-root user to mount an arbitrary
> FAT-formatted USB stick partition read-write in a predictable place.

That is a fair summary. (The situation did become a little less clear
later on when Mate was mentioned).

> One way of achieving this is to monitor /var/log/syslog while plugging
> the drive in, observe how the OS identifies the drive, and use this
> information to construct a mount statement to be typed into a
> command window as root.

It's 2016; being root to get information about a plugged-in USB stick
and mount it is unnecessary.

> Or, since exactly the same procedure is necessary each time, it could
> be done by a computer. The computer which the drive had just been
> plugged into would be a good choice. Plug in a drive and a large button
> appears on the screen, marked 'Mount the drive you just plugged in'.
> 
> While this does not actually constitute automounting, I suggest that it
> differs by a single mouse click. And actually, I didn't deduce that
> automounting was what the OP wanted, I said that it was what *I* had
> working. The point was to demonstrate that software existed to do the
> job the OP wanted done, even if I didn't see quite what software that
> was.

The quote I gave (it's in double quotes) was not from one of your posts.
I understood exactly what you said and even responded to your
observation that a plugged in USB stick shows instantly in file managers
with a very short outline of what is involved. I'll flesh it out with
throwing dbus and udev into the mix. The thing about voodoo is that even
a hazy understanding of what it does removes its power.

-- 
Brian. 



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Joe
On Mon, 21 Nov 2016 17:36:19 +
Brian  wrote:

> On Mon 21 Nov 2016 at 18:18:27 +0100, to...@tuxteam.de wrote:
> 
> > On Mon, Nov 21, 2016 at 04:37:50PM +, Brian wrote:
> > 
> > [...]
> >   
> > > I cannot recollect or find any mention of the OP wanting to
> > > automount.  
> > 
> > Not explicitly, sure. The point is, it was implicitly expected,
> > because for the OP, it's the "normal" thing. It Just Happens.  
> 
> I have no idea what the OP's "normal" thing is when it comes to using
> his computer. My expections (correct or not) are usually based on what
> is said.
> 
> > This sort of thing is what I meant by "recalibrating our
> > expectations": we are better able to help when we are better able
> > to put ourselves in the questioner's position.  
> 
> Someone deduced "He wants auto-mounting of the inserted media". The
> evidence isn't there. Putting one's self in the a user's position is
> one thing; putting words into his mouth is another.
> 

The requirement was for a non-root user to mount an arbitrary
FAT-formatted USB stick partition read-write in a predictable place.

One way of achieving this is to monitor /var/log/syslog while plugging
the drive in, observe how the OS identifies the drive, and use this
information to construct a mount statement to be typed into a
command window as root.

Or, since exactly the same procedure is necessary each time, it could
be done by a computer. The computer which the drive had just been
plugged into would be a good choice. Plug in a drive and a large button
appears on the screen, marked 'Mount the drive you just plugged in'.

While this does not actually constitute automounting, I suggest that it
differs by a single mouse click. And actually, I didn't deduce that
automounting was what the OP wanted, I said that it was what *I* had
working. The point was to demonstrate that software existed to do the
job the OP wanted done, even if I didn't see quite what software that
was.

-- 
Joe





Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Brian
On Mon 21 Nov 2016 at 18:18:27 +0100, to...@tuxteam.de wrote:

> On Mon, Nov 21, 2016 at 04:37:50PM +, Brian wrote:
> 
> [...]
> 
> > I cannot recollect or find any mention of the OP wanting to automount.
> 
> Not explicitly, sure. The point is, it was implicitly expected, because
> for the OP, it's the "normal" thing. It Just Happens.

I have no idea what the OP's "normal" thing is when it comes to using
his computer. My expections (correct or not) are usually based on what
is said.

> This sort of thing is what I meant by "recalibrating our expectations":
> we are better able to help when we are better able to put ourselves
> in the questioner's position.

Someone deduced "He wants auto-mounting of the inserted media". The
evidence isn't there. Putting one's self in the a user's position is one
thing; putting words into his mouth is another.

> > But, if it was required, there isudevil in Debian; no need to search
> > far and wide for a solution.
> 
> Hm? My package search (and apt-file) turn empty on this.

udevil.

-- 
Brian.



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread David Wright
Disclaimer: I have no idea what the subject of this thread is about.

On Mon 21 Nov 2016 at 15:11:21 (+0100), to...@tuxteam.de wrote:
> On Mon, Nov 21, 2016 at 08:34:42AM -0500, Greg Wooledge wrote:
> > On Mon, Nov 21, 2016 at 01:26:45PM +, Eduardo M KALINOWSKI wrote:
> > > Well, when the OP writes "sane" he does not mean sane the program, but  
> > > rather that he wants reasonable or rational file permissions (see  
> > > https://en.wiktionary.org/wiki/sane#Adjective ).
> > 
> > I think, unfortunately, he actually means "I know what I want, and you
> > should know what I want, and I shouldn't have to explicitly say what
> > I wants, because everyone has the same background and experiences that
> > I do, so you all know what I mean without my saying it, right?"
> 
> Well paraphrased, albeit a bit biased. I think the discussion has the
> potential to calibrate "our" expectations too.

Well, I know what my expectations are: to see an idiosyncratic problem
posed (it SHALL do this and that) and then see people slapped down for
not sticking to the precise conditions spelled out or implied by the OP,
should they make a suggestion that is probably more useful to others
having a similar (but not absolutely identical) problem.
The usefulness of many suggestions is limited, of course, by the OPs
insistence that a horse and cart is driven through the unix security
model merely because the OP never connects anything to the internet
(which is insane).

> > After reading other responses in this massive thread, I come to a few
> > conclusions:
> > 
> > 1) He wants auto-mounting of the inserted media, in the manner of Microsoft
> >Windows.  I don't know how he expects to handle unmounting.

As the OP always declares a desire to learn more, then it might be
appropriate to suggest writing a script running under root which
watches for any /dev/sd* devices to pop up, creates mount points,
appends lines to /etc/fstab (umask = 0, of course) and mounts them.
The script could sleep and loop or be run under cron.

> I guess the way (Win)DOS has been doing since times immemorial: pull the
> thing out and cope with the eventual corruption (yeah, I know Windows
> has had a "safe eject" functionality for quite a while, but: how much
> are people using it? and... the cultural roots hadn't it). But most DEs
> have a button to "eject" the media (which really means unmount: now an
> USB socket with a mechanical ejector would be really cool :-)

One could always reboot or, in the OP's case, reinstall Debian :)

> > 2) Apparently many Linux desktop environments offer this service, although
> >nobody currently responding to this thread knows how they do this.
> >It's voodoo.
> 
> Well: udisks was mentioned, and also pmount. Slowly we're getting the
> pieces together. But you're right: DEs are (from my POV) horribly
> inscrutable. That's one of the reasons I avoid them.
> 
> Sometimes I've to fix something for a customer (my most important customer
> being my SO), and I'm invariably horrified at the Rube Goldberg quality
> of those things. More frustrating is, it seems to be difficult to find
> somebody who can point you to a rough sketch on how things work. But yes, 
> YMMV.
> 
> > 3) My own previous response, coming from a no-desktop-environment viewpoint,
> >was premature.  Everything I said was correct only in my own subset
> >of the Debian world, where I use things that I understand and not
> >voodoo desktop environments that nobody understands.
> 
> Yep. Seems we are on the same page there. Still I want to help users, even
> those using voodoo, whithin my possibilities.

I'm not sure why the OP would want DE solutions. If you want to learn
how to troubleshoot car engines, you start with an old car, not with
one where about the only thing you can do when you lift the bonnet is
find that there's just room to plug into the computer diagnostic
socket (if that's where they go).

Cheers,
David.



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Nov 21, 2016 at 04:37:50PM +, Brian wrote:

[...]

> I cannot recollect or find any mention of the OP wanting to automount.

Not explicitly, sure. The point is, it was implicitly expected, because
for the OP, it's the "normal" thing. It Just Happens.

This sort of thing is what I meant by "recalibrating our expectations":
we are better able to help when we are better able to put ourselves
in the questioner's position.

> But, if it was required, there isudevil in Debian; no need to search
> far and wide for a solution.

Hm? My package search (and apt-file) turn empty on this.

thanks
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgzLGMACgkQBcgs9XrR2kbBTgCeMxfGHk3zGS92RQu0fvp1H6CZ
HT8An3AasC3MOBz4ShL2auIj0q6JsskD
=Okmw
-END PGP SIGNATURE-



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread rhkramer
On Monday, November 21, 2016 11:25:13 AM Brian wrote:
> On Mon 21 Nov 2016 at 10:37:33 -0500, rhkra...@gmail.com wrote:
> > On my Jessie system, neither pmount nor udisks is installed, but udisks2
> > apparently is, and I suspect it is what provides that functionality on
> > Jessie. There does not seem to be a =udisks2 --dump= function.
> 
> udisksctl dump

Thanks!



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Brian
On Mon 21 Nov 2016 at 15:13:02 +0100, to...@tuxteam.de wrote:

> On Mon, Nov 21, 2016 at 02:08:09PM +, Darac Marjal wrote:
> 
> [...]
> 
> > >https://www.axllent.org/docs/view/auto-mounting-usb-storage/ shows
> > >a set of udev rules that will mount a vfat or ntfs USB stick to
> > >"/media/${File System ID or Label}", AND set the user permissions
> > >appropriately.
> > 
> > Sorry, slight clarification as I read it again. It will mount ANY
> > new device matching /dev/sd[a-z][0-9], but for vfat and ntfs drives
> > it adds extra options to the mount command.
> 
> Thanks for this one. This might be Richard's ultimate solution (albeit
> a bit heavy-handed).

I cannot recollect or find any mention of the OP wanting to automount.
But, if it was required, there isudevil in Debian; no need to search
far and wide for a solution.

-- 

Brian.



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread Brian
On Mon 21 Nov 2016 at 10:37:33 -0500, rhkra...@gmail.com wrote:

> On my Jessie system, neither pmount nor udisks is installed, but udisks2 
> apparently is, and I suspect it is what provides that functionality on 
> Jessie.  
> There does not seem to be a =udisks2 --dump= function.

udisksctl dump

-- 
Brian.



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread rhkramer
On Monday, November 21, 2016 09:11:21 AM to...@tuxteam.de wrote:
> On Mon, Nov 21, 2016 at 08:34:42AM -0500, Greg Wooledge wrote:
> > On Mon, Nov 21, 2016 at 01:26:45PM +, Eduardo M KALINOWSKI wrote:

> > 1) He wants auto-mounting of the inserted media, in the manner of
> > Microsoft
> > 
> >Windows.  I don't know how he expects to handle unmounting.



> > 2) Apparently many Linux desktop environments offer this service,
> > although
> > 
> >nobody currently responding to this thread knows how they do this.
> >It's voodoo.
> 
> Well: udisks was mentioned, and also pmount. Slowly we're getting the
> pieces together. But you're right: DEs are (from my POV) horribly
> inscrutable. That's one of the reasons I avoid them.

Just adding some  information to what I mentioned in an earlier post:

On my Wheezy machine, apparently udisks handles the mounting and unmounting of 
USB sticks (and maybe a lot more--running =udisks --dump= provides information 
on all my disks, including some health information from SMART.

As far as unmounting, if I right click on the device in the left hand pane / 
column of dolphin, the context menu gives me an option to "Safely remove "... 
Removable Media"'.

On my Jessie system, neither pmount nor udisks is installed, but udisks2 
apparently is, and I suspect it is what provides that functionality on Jessie.  
There does not seem to be a =udisks2 --dump= function.

Also, there is not an option to "Safely remove "... Removable Media"' when 
right clicking on the device in dolphin.

I try to make it a practice to run sync twice (and wait for it to return) 
before removing the pendrive.




Re: Coercing sane file permissions -- site specific

2016-11-21 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Nov 21, 2016 at 02:08:09PM +, Darac Marjal wrote:

[...]

> >https://www.axllent.org/docs/view/auto-mounting-usb-storage/ shows
> >a set of udev rules that will mount a vfat or ntfs USB stick to
> >"/media/${File System ID or Label}", AND set the user permissions
> >appropriately.
> 
> Sorry, slight clarification as I read it again. It will mount ANY
> new device matching /dev/sd[a-z][0-9], but for vfat and ntfs drives
> it adds extra options to the mount command.

Thanks for this one. This might be Richard's ultimate solution (albeit
a bit heavy-handed).

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgzAO4ACgkQBcgs9XrR2kYJSwCbB8mliA3lPbc239E3cuu6T7Ou
xv4An3OifvcIlXnPzAEotWFayGqt2kAK
=ObTz
-END PGP SIGNATURE-



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Nov 21, 2016 at 08:34:42AM -0500, Greg Wooledge wrote:
> On Mon, Nov 21, 2016 at 01:26:45PM +, Eduardo M KALINOWSKI wrote:
> > Well, when the OP writes "sane" he does not mean sane the program, but  
> > rather that he wants reasonable or rational file permissions (see  
> > https://en.wiktionary.org/wiki/sane#Adjective ).
> 
> I think, unfortunately, he actually means "I know what I want, and you
> should know what I want, and I shouldn't have to explicitly say what
> I wants, because everyone has the same background and experiences that
> I do, so you all know what I mean without my saying it, right?"

Well paraphrased, albeit a bit biased. I think the discussion has the
potential to calibrate "our" expectations too.

> After reading other responses in this massive thread, I come to a few
> conclusions:
> 
> 1) He wants auto-mounting of the inserted media, in the manner of Microsoft
>Windows.  I don't know how he expects to handle unmounting.

I guess the way (Win)DOS has been doing since times immemorial: pull the
thing out and cope with the eventual corruption (yeah, I know Windows
has had a "safe eject" functionality for quite a while, but: how much
are people using it? and... the cultural roots hadn't it). But most DEs
have a button to "eject" the media (which really means unmount: now an
USB socket with a mechanical ejector would be really cool :-)

> 2) Apparently many Linux desktop environments offer this service, although
>nobody currently responding to this thread knows how they do this.
>It's voodoo.

Well: udisks was mentioned, and also pmount. Slowly we're getting the
pieces together. But you're right: DEs are (from my POV) horribly
inscrutable. That's one of the reasons I avoid them.

Sometimes I've to fix something for a customer (my most important customer
being my SO), and I'm invariably horrified at the Rube Goldberg quality
of those things. More frustrating is, it seems to be difficult to find
somebody who can point you to a rough sketch on how things work. But yes, YMMV.

> 3) My own previous response, coming from a no-desktop-environment viewpoint,
>was premature.  Everything I said was correct only in my own subset
>of the Debian world, where I use things that I understand and not
>voodoo desktop environments that nobody understands.

Yep. Seems we are on the same page there. Still I want to help users, even
those using voodoo, whithin my possibilities.

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgzAIkACgkQBcgs9XrR2kb1QgCeJD+/s259HrtLj/13ef8K5EOP
490An1WTIdt2uJxDkXe/V45o+Ia11u0g
=BXMq
-END PGP SIGNATURE-



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Darac Marjal

On Mon, Nov 21, 2016 at 01:53:25PM +, Darac Marjal wrote:

On Mon, Nov 21, 2016 at 08:18:39AM -0500, Greg Wooledge wrote:

On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:

I use fat16 and fat32 formatted USB flash drives



When I plug one into my Debian machine I want totally unfettered
read/write access.
[when logged in as root or *ANY* user ID]


You can't.

You have to be root to mount one of these things, or to edit the
/etc/fstab file to give an ordinary user the permission to mount one of
these things.


Let me restate this another way. Greg said "You have to be root to 
mount ...". Another way to say this is "Only root can mount ...".


What's the difference? If you want to mount you can EITHER switch to 
root and issue a mount command as root, OR you can install something 
which runs AS ROOT and mounts the device automatically.


Now, I believe pmount was mentioned in this thread, as was udisks. 
These demons can be considered brokers. You ask them to mount the disk 
and they, running as root, mount the disk and set the appropriate 
permissions to your user.


There is another alternative that I just found, though. With a little 
hacking, you can get udev itself to mount the drive.


https://www.axllent.org/docs/view/auto-mounting-usb-storage/ shows a 
set of udev rules that will mount a vfat or ntfs USB stick to 
"/media/${File System ID or Label}", AND set the user permissions 
appropriately.


Sorry, slight clarification as I read it again. It will mount ANY new 
device matching /dev/sd[a-z][0-9], but for vfat and ntfs drives it adds 
extra options to the mount command.



--
For more information, please reread.



Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Darac Marjal

On Mon, Nov 21, 2016 at 08:18:39AM -0500, Greg Wooledge wrote:

On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:

I use fat16 and fat32 formatted USB flash drives



When I plug one into my Debian machine I want totally unfettered
read/write access.
[when logged in as root or *ANY* user ID]


You can't.

You have to be root to mount one of these things, or to edit the
/etc/fstab file to give an ordinary user the permission to mount one of
these things.


Let me restate this another way. Greg said "You have to be root to mount 
...". Another way to say this is "Only root can mount ...".


What's the difference? If you want to mount you can EITHER switch to 
root and issue a mount command as root, OR you can install something 
which runs AS ROOT and mounts the device automatically.


Now, I believe pmount was mentioned in this thread, as was udisks. These 
demons can be considered brokers. You ask them to mount the disk and 
they, running as root, mount the disk and set the appropriate 
permissions to your user.


There is another alternative that I just found, though. With a little 
hacking, you can get udev itself to mount the drive.


https://www.axllent.org/docs/view/auto-mounting-usb-storage/ shows a set 
of udev rules that will mount a vfat or ntfs USB stick to "/media/${File 
System ID or Label}", AND set the user permissions appropriately.


Pay appropriate attention to the line with "ENV{mount_options}=" in, 
though. Use the information elsewhere in this thread to set a sensible 
uid, gid and umask to get the permissions you require.




Didn't we tell you this multiple times over the last several weeks?
Yes, we did.

AS ROOT, you can determine the device name (which is dynamically
generated every time you plug it in), and then mount it with some
commands like:

mkdir -p /usb
mount -o uid=richard /dev/sdb1 /usb

Where /dev/sdb1 is the partition you want to mount, and /usb is a
directory you create specifically for the purpose of mounting the
device onto.  And "richard" is the username you want the files to
appear to be owned by.

ONCE IT IS MOUNTED, then user "richard" can read and write to the
files and directories.

To unmount it, you have to be root again.  And then it's simply:

umount /usb



--
For more information, please reread.



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread Greg Wooledge
On Mon, Nov 21, 2016 at 01:26:45PM +, Eduardo M KALINOWSKI wrote:
> Well, when the OP writes "sane" he does not mean sane the program, but  
> rather that he wants reasonable or rational file permissions (see  
> https://en.wiktionary.org/wiki/sane#Adjective ).

I think, unfortunately, he actually means "I know what I want, and you
should know what I want, and I shouldn't have to explicitly say what
I wants, because everyone has the same background and experiences that
I do, so you all know what I mean without my saying it, right?"

After reading other responses in this massive thread, I come to a few
conclusions:

1) He wants auto-mounting of the inserted media, in the manner of Microsoft
   Windows.  I don't know how he expects to handle unmounting.

2) Apparently many Linux desktop environments offer this service, although
   nobody currently responding to this thread knows how they do this.
   It's voodoo.

3) My own previous response, coming from a no-desktop-environment viewpoint,
   was premature.  Everything I said was correct only in my own subset
   of the Debian world, where I use things that I understand and not
   voodoo desktop environments that nobody understands.



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread Eduardo M KALINOWSKI

On Seg, 21 Nov 2016, Lisi Reisz wrote:

The most frustrating thing about this whole thread, which I had been saving
because I have a SANE problem (more later), and SANE problems are often to do
with permissions, is that it has nothing *whatsoever* to do with SANE. :-(

It is about file permissions or USB key file permissions.  It is *not* about
SANE. :-((


Well, when the OP writes "sane" he does not mean sane the program, but  
rather that he wants reasonable or rational file permissions (see  
https://en.wiktionary.org/wiki/sane#Adjective ).


It's true that the subject could also be interpreted as "Coercing the  
permissions of files used by [the program] sane", but nevertheless  
what he wrote is perfectly correct, so don't berate him for that.


--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br




Re: Coercing sane file permissions -- site specific

2016-11-21 Thread Greg Wooledge
On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:
> I use fat16 and fat32 formatted USB flash drives

> When I plug one into my Debian machine I want totally unfettered 
> read/write access.
> [when logged in as root or *ANY* user ID]

You can't.

You have to be root to mount one of these things, or to edit the
/etc/fstab file to give an ordinary user the permission to mount one of
these things.

Didn't we tell you this multiple times over the last several weeks?
Yes, we did.

AS ROOT, you can determine the device name (which is dynamically
generated every time you plug it in), and then mount it with some
commands like:

mkdir -p /usb
mount -o uid=richard /dev/sdb1 /usb

Where /dev/sdb1 is the partition you want to mount, and /usb is a
directory you create specifically for the purpose of mounting the
device onto.  And "richard" is the username you want the files to
appear to be owned by.

ONCE IT IS MOUNTED, then user "richard" can read and write to the
files and directories.

To unmount it, you have to be root again.  And then it's simply:

umount /usb



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-21 Thread Lisi Reisz
On Sunday 20 November 2016 20:54:17 Brian wrote:
[snip whole thread which doesn't match subject line]

The most frustrating thing about this whole thread, which I had been saving 
because I have a SANE problem (more later), and SANE problems are often to do 
with permissions, is that it has nothing *whatsoever* to do with SANE. :-(

It is about file permissions or USB key file permissions.  It is *not* about 
SANE. :-((

And it is obviously DE relevant anyway.

Lisi

Richard - Google "SANE" and "linux"



Re: MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-20 Thread Brian
On Sun 20 Nov 2016 at 14:25:16 -0600, Richard Owlett wrote:

> On 11/19/2016 12:51 PM, Richard Owlett wrote:
> >I use fat16 and fat32 formatted USB flash drives for _EXACTLY_
> >*ONE* purpose.
> >It is to transfer data to/from a Windows machine.
> >There is NO [nor will there ever be] a network connection between
> >them.
> >
> >When I plug one into my Debian machine I want totally unfettered
> >read/write access.
> >[when logged in as root or *ANY* user ID]
> >
> >
> >HOW?
> >{any one notice a tone of frustration ;/}
> >
> 
> Just now, using the "Places" entry on MATE's menu bar I was able to:
>  1. mount the specific flash drive that triggered this 'plaint.
>  2. edit the *SPECIFIC* text file that Pluma would only open as "READ ONLY".
> That had been "straw that broke the camel's back".

You are saying you have solved your problem? It no longer exists? It may
not have existed in the first place? You didn't know what you were doing?
Can we now get back to normal service?

Questions; questions. Feel free to ignore them.

> This has me wondering if the objectionable reaction was *before* OR *after*
> having run
>  gsettings set org.mate.media-handling automount false

You can wonder as much as you want. Nobody has access to the system you
are on. Wondering will not get anyone anywhere.

> For another project, I was already intending to create a custom preseed.cfg.
> That will allow me to do _functionally_ identical installs [only physical
> difference being the target partition of the installation procedure.].
> 
> Is there a standard log file that will record *ALL* operator GUI *OR*
> command line actions *AND* the system's response?

journalctl?
 
> I've the time but am short on test procedure design skills.

You've got the time but have you got the inclination? (I feel I'm
quoting someone but haven't a clue who it is).

-- 
Brian.



MURPHY'S LAW RULES - was [Re: Coercing sane file permissions -- site specific]

2016-11-20 Thread Richard Owlett

On 11/19/2016 12:51 PM, Richard Owlett wrote:

I use fat16 and fat32 formatted USB flash drives for _EXACTLY_
*ONE* purpose.
It is to transfer data to/from a Windows machine.
There is NO [nor will there ever be] a network connection between
them.

When I plug one into my Debian machine I want totally unfettered
read/write access.
[when logged in as root or *ANY* user ID]


HOW?
{any one notice a tone of frustration ;/}



Just now, using the "Places" entry on MATE's menu bar I was able to:
 1. mount the specific flash drive that triggered this 'plaint.
 2. edit the *SPECIFIC* text file that Pluma would only open as 
"READ ONLY".

That had been "straw that broke the camel's back".

This has me wondering if the objectionable reaction was *before* 
OR *after* having run

 gsettings set org.mate.media-handling automount false

For another project, I was already intending to create a custom 
preseed.cfg.
That will allow me to do _functionally_ identical installs [only 
physical difference being the target partition of the 
installation procedure.].


Is there a standard log file that will record *ALL* operator GUI 
*OR* command line actions *AND* the system's response?


I've the time but am short on test procedure design skills.






Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Nicolas George
Le decadi 30 brumaire, an CCXXV, Joe a écrit :
> Conceptually so, but some means of mounting USB sticks do not involve
> the user explicitly issuing a mount command.

Yet, eventually it involves mount and options. The OP's task now is to
find out what system is used to automagically mount USB sticks and how
to set the options.

Hence the need to know about the options: Tomas' answer was indeed the
right one.


signature.asc
Description: Digital signature


Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Brian
On Sun 20 Nov 2016 at 19:41:59 +, Joe wrote:

> On Sun, 20 Nov 2016 19:45:27 +0100
> Nicolas George  wrote:
> 
> > Le decadi 30 brumaire, an CCXXV, Joe a écrit :
> > > Tomas' answer contains *a* solution, for a specific device.   
> > 
> > Tomas' answer points to the umask mount option. Since all current
> > reasonable methods for accessing an USB stick in FAT end up using the
> > mount system call, it is THE solution.
> > 
> 
> Conceptually so, but some means of mounting USB sticks do not involve
> the user explicitly issuing a mount command.

A user cannot issue the command 'mount /dev/foo mnt -oumask=000'. Well,
she/he can - but it won't get them anywhere.

-- 
Brian



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Joe
On Sun, 20 Nov 2016 19:45:27 +0100
Nicolas George  wrote:

> Le decadi 30 brumaire, an CCXXV, Joe a écrit :
> > Tomas' answer contains *a* solution, for a specific device.   
> 
> Tomas' answer points to the umask mount option. Since all current
> reasonable methods for accessing an USB stick in FAT end up using the
> mount system call, it is THE solution.
> 

Conceptually so, but some means of mounting USB sticks do not involve
the user explicitly issuing a mount command.

-- 
Joe



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Nicolas George
Le decadi 30 brumaire, an CCXXV, Joe a écrit :
> Tomas' answer contains *a* solution, for a specific device. 

Tomas' answer points to the umask mount option. Since all current
reasonable methods for accessing an USB stick in FAT end up using the
mount system call, it is THE solution.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature


Re: Coercing sane file permissions -- site specific

2016-11-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Nov 20, 2016 at 12:19:49PM -0500, The Wanderer wrote:
> On 2016-11-20 at 11:46, Joe wrote:
> 
> > On Sun, 20 Nov 2016 15:14:47 +0100  wrote:
> 
> >> Sorry I can't offer more details: I'm not "in" the intricacies of
> >> desktop environments. For me, they are too intricate and finicky,
> >> therefore I prefer to run without.
> >> 
> >> I mount my media explicitly.
> > 
> > So do I. If I don't want a USB stick mounted, I don't plug it in.
> 
> That's not explicit; it's invoking the implicit mount which your system
> is configured to execute upon the device being connected.

Exactly. Perhaps I was too concise. With "explicit" I meant that I always
issue the mount command in a command line myself.

[a couple of good reasons elided]

> I imagine there may be other possibilities...

Yes: file system code is not well tested with malicious file systems.
There may be an exploit lurking there. If I don't trust the USB stick,
I don't mount it right away, but I might want to have a look at the
raw data (or perhaps mount it from a VM).

> > I don't want any applications or media to autorun, but I do want the
> > filesystems mounted.
> 
> That's an entirely reasonable usage pattern, but it is not explicit
> mounting, and there are legitimate reasons why someone might want
> different behavior.

Agreed. The nice thing is that each one of us can have her/his own
way :-)

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgx4pUACgkQBcgs9XrR2kbR3wCcDFsQE/NzevtX24rhmRRx68SO
u+sAn1sd8r4VK2r9I0W2zggmKxqZRZqM
=NfNc
-END PGP SIGNATURE-



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Brian
On Sun 20 Nov 2016 at 13:58:04 +, Joe wrote:

> I'm running sid with systemd, with absolutely nothing in /etc/fstab
> which refers to USB sticks, but nonetheless any USB stick inserted is
> recognised and automounted under /media/joe (maybe immediately and maybe
> on access, I'm not sure, but it shows instantly in file managers) with
> everything in a FAT partition having ownership of joe:me and
> permissions of 644. Ext partitions have their own permissions, as
> expected.

This is done through the agency of the udisks2 daemon and gvfs.

-- 
Brian.



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Brian
On Sun 20 Nov 2016 at 07:40:17 -0600, Richard Owlett wrote:

> On 11/20/2016 7:29 AM, Brian wrote:
> >
> >Doesn't pmount fit the bill if all you want is to read/write?
> 
> No.
> 
> Maybe the problem is D.E. specific? I'm using MATE and thus Caja as
> file-manager.

TBH, the problem as such isn't clear to me. You have USB stick which is
formatted FAT16 (say). I'd expect after plugging it into your Debian
machine 'lsblk' would show the device and its partitions. Does this
happen?

Then something like

  pmount sdg1

would put the mount point as /media/sdg1. Does this happen?

> On top menu-bar Places will list identifiers for mountable devices.
> Clicking the "identifier" will "mount" the identified device.
> It will use information available from /etc/fstab and/or pmount.allow .
> Neither appears to have an entry equivalent to "any FAT filesystem on
> plugable device".

What I'm unclear about is whether this is a question which is about the
DE being used. I cannot see the problem being DE specific, either. In
GNOME and Xfce the USB device would show up left hand pane of Nautilus.
Mounting is by right clicking on it. pmount has nothing to do with the
mounting.

-- 
Brian.




Re: Coercing sane file permissions -- site specific

2016-11-20 Thread The Wanderer
On 2016-11-20 at 11:46, Joe wrote:

> On Sun, 20 Nov 2016 15:14:47 +0100  wrote:

>> Sorry I can't offer more details: I'm not "in" the intricacies of
>> desktop environments. For me, they are too intricate and finicky,
>> therefore I prefer to run without.
>> 
>> I mount my media explicitly.
> 
> So do I. If I don't want a USB stick mounted, I don't plug it in.

That's not explicit; it's invoking the implicit mount which your system
is configured to execute upon the device being connected.

Unless you are explicitly issuing a command which says "mount this
device to this path", you are not _explicitly_ mounting the media; it
either is not being mounted at all, or is being mounted automatically.
Connecting a device does not equal issuing a command to mount it.

> If I do plug it in, apart from formatting, why would I not want it
> mounted?

Perhaps because you know the drive is damaged, such that the mount
attempt will fail (and might hang, or even spawn zombie processes), and
you don't want the system attempting to access it unnecessarily.

Perhaps because there are multiple filesystems on the device, and you
only want to mount one of them. (Perhaps you even want to refrain from
updating access timestamps which get updated on mount or unmount; I
believe there are filesystems which include that behavior.)

Perhaps because you want to _choose_ where to mount it to, according to
criteria specific to the case at hand, rather than relying on whatever
global defaults are configured.

Perhaps because you want to dump an unmodified copy of the filesystem to
a file on local disk, without risking the filesystem being modified
during the mount / unmount process.

I imagine there may be other possibilities...

> I don't want any applications or media to autorun, but I do want the
> filesystems mounted.

That's an entirely reasonable usage pattern, but it is not explicit
mounting, and there are legitimate reasons why someone might want
different behavior.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Joe
On Sun, 20 Nov 2016 15:14:47 +0100
 wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Sun, Nov 20, 2016 at 01:58:04PM +, Joe wrote:
> > On Sun, 20 Nov 2016 13:33:51 +0100
> > Nicolas George  wrote:
> >   
> > > Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :  
> > > > Not as I read them.
> > > 
> > > Then you did not read correctly.
> > >   
> > > > They give methods of handling an explicitly specified
> > > > device.
> > > 
> > > Tomas' answer contains the solution to your problem: the umask
> > > mount option. This it, no more no less.
> > > 
> > > To know how to actually use it, re-read Tomas' answer, RTFM, RTFW
> > > or hire a consultant. But you have your answer.  
> > 
> > Tomas' answer contains *a* solution, for a specific device. 
> > 
> > There *is* a generic answer, which requires no fstab entry, but I
> > have to admit that I haven't a clue what it is.  
> 
> This is your desktop environment doing it for you (noticed how it
> mounts under /media/joe? Guess what happens if you had set up
> another user and "were logged in as" this other user? /media/joe
> or rather /media/otheruser? That's it).

Well done. I assumed it was a lower level than that, as usbmount wasn't
DE-specific.

I'm running Xfce, hence the Thunar file manager, which I don't use, and
apparently thunar-volman which does automounting. It doesn't show up in
an apt-cache search for automount.

> 
> Of course the DE doesn't do the mount directly, but relies on
> pmount or something similar.

I don't have pmount installed.
> 
> Sorry I can't offer more details: I'm not "in" the intricacies of
> desktop environments. For me, they are too intricate and finicky,
> therefore I prefer to run without.
> 
> I mount my media explicitly.
> 

So do I. If I don't want a USB stick mounted, I don't plug it in. If I
do plug it in, apart from formatting, why would I not want it mounted?
I don't want any applications or media to autorun, but I do want the
filesystems mounted.

-- 
Joe



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Joe
On Sun, 20 Nov 2016 08:10:09 -0600
Richard Owlett  wrote:


> Do you have a file named "pmount.allow"?
> Web searches turn up references to it, but haven't found any 
> details on syntax and/or examples.
> 
> 
> 

I don't have pmount installed. I tried it years ago, when I was having
usbmount trouble, and now can't remember why, but it wasn't the right
answer.

-- 
Joe



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Nov 20, 2016 at 10:15:40AM -0500, rhkra...@gmail.com wrote:
> Ok, I tried it on Jessie, and it works essentially the same way, with a few 
> slight differences:
> 
>* when the USB stick shows up in dolphin, it does not show the mount 
> point, 
> instead it says something like "Removable 8MiB device"
> 
>* if I then go to a CLI and look under media, I find the device listed as 
> follows, and can access the files:
> 
> e.g., ls /media//84BE-2329.
> 
> I don't know where the "84BE-2329" comes from, but it seems to be associated 
> with the USB stick, as it is the same on both machines.

This is most probably the file system label.

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgxyPIACgkQBcgs9XrR2kbAyQCfUYTkXNPySLQJBoGVpNrmFnpM
oQsAn3QXRq6bRZ0DvPNpJ5BmsqSsUrmQ
=KEyc
-END PGP SIGNATURE-



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread rhkramer
Ok, I tried it on Jessie, and it works essentially the same way, with a few 
slight differences:

   * when the USB stick shows up in dolphin, it does not show the mount point, 
instead it says something like "Removable 8MiB device"

   * if I then go to a CLI and look under media, I find the device listed as 
follows, and can access the files:

e.g., ls /media//84BE-2329.

I don't know where the "84BE-2329" comes from, but it seems to be associated 
with the USB stick, as it is the same on both machines.

On Sunday, November 20, 2016 09:38:21 AM rhkra...@gmail.com wrote:
> I'll answer with something a little bit like Joe's answer.  On my daily
> working machine, which uses Wheezy, I use Dophin as a file manager.
> 
> After I plug in a USB stick, after a few seconds (maybe up to 20??), a new
> entry appears on the left hand list of partitions in Dolphin.  If I click
> on that, the files are displayed in the (current working) pane of Dolphin,
> and I can use the mouse to drag and drop them, open them, or similar.
> 
> The top of that dophin pane shows where the device is mounted, for example,
> /media/84BE-2329/.
> 
> If I then go to a CLI and refer to that mountpoint, I can access the files.
> 
> To anticipate an answer to your potential next question, there is no
> pmount.allow file on this computer.
> 
> I may try the same thing on my future daily working machine, using Jessie
> (and, iiuc, systemd or whatever it is called).  If I try that, I'll let you
> know.
> 
> On Sunday, November 20, 2016 08:58:04 AM Joe wrote:
> > There *is* a generic answer, which requires no fstab entry, but I have
> > to admit that I haven't a clue what it is.
> > 
> > I'm running sid with systemd, with absolutely nothing in /etc/fstab
> > which refers to USB sticks, but nonetheless any USB stick inserted is
> > recognised and automounted under /media/joe (maybe immediately and maybe
> > on access, I'm not sure, but it shows instantly in file managers) with
> > everything in a FAT partition having ownership of joe:me and
> > permissions of 644. Ext partitions have their own permissions, as
> > expected.
> > 
> > This all Just Works, and I have no idea what configuration it depends
> > on. "I didn't build this," sid basically builds and rebuilds itself, so
> > I tend to keep my fingers out of the works. I do know that USB sticks
> > were a real pain with usbmount, which *sometimes* mounted the entire
> > device instead of the partitions, and at some point, things just
> > started working better.
> > 
> > There is nothing in /etc/polkit-1, /etc/udev or /etc/udisks2 referring
> > to USB sticks, which are the most likely suspects as far as I can see.
> > Presumably the culprit is systemd, as usual, so possibly someone more
> > knowledgable about this beast can finish my part-answer.



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Brian
On Sun 20 Nov 2016 at 08:10:09 -0600, Richard Owlett wrote:

> On 11/20/2016 7:58 AM, Joe wrote:
> >
> >This all Just Works, and I have no idea what configuration it depends
> >on. "I didn't build this," sid basically builds and rebuilds itself, so
> >I tend to keep my fingers out of the works. I do know that USB sticks
> >were a real pain with usbmount, which *sometimes* mounted the entire
> >device instead of the partitions, and at some point, things just
> >started working better.
> >
> >There is nothing in /etc/polkit-1, /etc/udev or /etc/udisks2 referring
> >to USB sticks, which are the most likely suspects as far as I can see.
> >Presumably the culprit is systemd, as usual, so possibly someone more
> >knowledgable about this beast can finish my part-answer.
> >
> 
> Do you have a file named "pmount.allow"?
> Web searches turn up references to it, but haven't found any details on
> syntax and/or examples.

/etc/pmount.allow is created when pmount is installed. The manual tells
you everything you need to know about it. With "/dev/sda1" as a line in
the file you can mount the partition with 'pmount sda1'.

I'd not think you would need to populate pmount.allow for a removable
device.

-- 
Brian.



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread rhkramer
I'll answer with something a little bit like Joe's answer.  On my daily 
working machine, which uses Wheezy, I use Dophin as a file manager.

After I plug in a USB stick, after a few seconds (maybe up to 20??), a new 
entry appears on the left hand list of partitions in Dolphin.  If I click on 
that, the files are displayed in the (current working) pane of Dolphin, and I 
can use the mouse to drag and drop them, open them, or similar.

The top of that dophin pane shows where the device is mounted, for example, 
/media/84BE-2329/.

If I then go to a CLI and refer to that mountpoint, I can access the files.

To anticipate an answer to your potential next question, there is no 
pmount.allow file on this computer.

I may try the same thing on my future daily working machine, using Jessie 
(and, iiuc, systemd or whatever it is called).  If I try that, I'll let you 
know.



On Sunday, November 20, 2016 08:58:04 AM Joe wrote:
> There *is* a generic answer, which requires no fstab entry, but I have
> to admit that I haven't a clue what it is.
> 
> I'm running sid with systemd, with absolutely nothing in /etc/fstab
> which refers to USB sticks, but nonetheless any USB stick inserted is
> recognised and automounted under /media/joe (maybe immediately and maybe
> on access, I'm not sure, but it shows instantly in file managers) with
> everything in a FAT partition having ownership of joe:me and
> permissions of 644. Ext partitions have their own permissions, as
> expected.
> 
> This all Just Works, and I have no idea what configuration it depends
> on. "I didn't build this," sid basically builds and rebuilds itself, so
> I tend to keep my fingers out of the works. I do know that USB sticks
> were a real pain with usbmount, which *sometimes* mounted the entire
> device instead of the partitions, and at some point, things just
> started working better.
> 
> There is nothing in /etc/polkit-1, /etc/udev or /etc/udisks2 referring
> to USB sticks, which are the most likely suspects as far as I can see.
> Presumably the culprit is systemd, as usual, so possibly someone more
> knowledgable about this beast can finish my part-answer.



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Nov 20, 2016 at 06:08:51AM -0600, Richard Owlett wrote:
> On 11/19/2016 2:33 PM, to...@tuxteam.de wrote:

[mount options, fstab]

> Those don't address my problem definition.
> Having a USB flash drive with a fat16/fat32 file system in hand, on
> inserting drive I wish full read/write access.
> After all, a FAT filesystem has no concept of ownership.
> What's wrong?

As others pointed out, they do, and then... they don't.

Sorry, I had too narrow a perspective to the problem, You seem to
expect your media to be mounted automatically (typically by the desktop
environment; that's what DEs do), I have no desktop environment and
issue the mount commands whenever I need them; thus the mount options
came naturally to me.

For Gnome and Gnome-like desktops, I think "pmount" is the mount
wrapper which ultimately invokes mount whenever the kernel detects
new media (the kernel communicates this event via the udev system,
someone (?) picks it up and invokes pmount. Pmount's job is to
do the necessary magic as superuser -- more or less).

I'm a bit out of my depth wrt desktop environments in general.
Based on pmount's man page [1] pmount.allow (which you mentioned
in another post) only lets you whitelist devices, not give them
any mount options, alas.

If I had to do it *and* if I wanted auto-mounting (which I very
much not want), I'd hack my way around in /etc/udev/rules.d.

Perhaps some desktop environment savvy folks can chime in.

regards

[1] https://linux.die.net/man/1/pmount
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgxtLEACgkQBcgs9XrR2kb3YgCeKxYo0ph9Z9za8ErE/8+L1rTC
xb4AniWKxGNQfXAVdjsfuvPda27mrGwa
=cvUs
-END PGP SIGNATURE-



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Nov 20, 2016 at 01:58:04PM +, Joe wrote:
> On Sun, 20 Nov 2016 13:33:51 +0100
> Nicolas George  wrote:
> 
> > Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :
> > > Not as I read them.  
> > 
> > Then you did not read correctly.
> > 
> > > They give methods of handling an explicitly specified device.  
> > 
> > Tomas' answer contains the solution to your problem: the umask mount
> > option. This it, no more no less.
> > 
> > To know how to actually use it, re-read Tomas' answer, RTFM, RTFW or
> > hire a consultant. But you have your answer.
> 
> Tomas' answer contains *a* solution, for a specific device. 
> 
> There *is* a generic answer, which requires no fstab entry, but I have
> to admit that I haven't a clue what it is.

This is your desktop environment doing it for you (noticed how it
mounts under /media/joe? Guess what happens if you had set up
another user and "were logged in as" this other user? /media/joe
or rather /media/otheruser? That's it).

Of course the DE doesn't do the mount directly, but relies on
pmount or something similar.

Sorry I can't offer more details: I'm not "in" the intricacies of
desktop environments. For me, they are too intricate and finicky,
therefore I prefer to run without.

I mount my media explicitly.

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgxr9cACgkQBcgs9XrR2kYE9QCdHcMYikUu3syn6IzIVxWsyRuU
sIMAn3ymPHEqBq/nYB+I5U3ZPTMBzkts
=JGkN
-END PGP SIGNATURE-



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Richard Owlett

On 11/20/2016 7:58 AM, Joe wrote:

On Sun, 20 Nov 2016 13:33:51 +0100
Nicolas George  wrote:


Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :

Not as I read them.


Then you did not read correctly.


They give methods of handling an explicitly specified device.


Tomas' answer contains the solution to your problem: the umask mount
option. This it, no more no less.

To know how to actually use it, re-read Tomas' answer, RTFM, RTFW or
hire a consultant. But you have your answer.


Tomas' answer contains *a* solution, for a specific device.

There *is* a generic answer, which requires no fstab entry, but I have
to admit that I haven't a clue what it is.

I'm running sid with systemd, with absolutely nothing in /etc/fstab
which refers to USB sticks, but nonetheless any USB stick inserted is
recognised and automounted under /media/joe (maybe immediately and maybe
on access, I'm not sure, but it shows instantly in file managers) with
everything in a FAT partition having ownership of joe:me and
permissions of 644. Ext partitions have their own permissions, as
expected.

This all Just Works, and I have no idea what configuration it depends
on. "I didn't build this," sid basically builds and rebuilds itself, so
I tend to keep my fingers out of the works. I do know that USB sticks
were a real pain with usbmount, which *sometimes* mounted the entire
device instead of the partitions, and at some point, things just
started working better.

There is nothing in /etc/polkit-1, /etc/udev or /etc/udisks2 referring
to USB sticks, which are the most likely suspects as far as I can see.
Presumably the culprit is systemd, as usual, so possibly someone more
knowledgable about this beast can finish my part-answer.



Do you have a file named "pmount.allow"?
Web searches turn up references to it, but haven't found any 
details on syntax and/or examples.






Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Joe
On Sun, 20 Nov 2016 13:33:51 +0100
Nicolas George  wrote:

> Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :
> > Not as I read them.  
> 
> Then you did not read correctly.
> 
> > They give methods of handling an explicitly specified device.  
> 
> Tomas' answer contains the solution to your problem: the umask mount
> option. This it, no more no less.
> 
> To know how to actually use it, re-read Tomas' answer, RTFM, RTFW or
> hire a consultant. But you have your answer.

Tomas' answer contains *a* solution, for a specific device. 

There *is* a generic answer, which requires no fstab entry, but I have
to admit that I haven't a clue what it is.

I'm running sid with systemd, with absolutely nothing in /etc/fstab
which refers to USB sticks, but nonetheless any USB stick inserted is
recognised and automounted under /media/joe (maybe immediately and maybe
on access, I'm not sure, but it shows instantly in file managers) with
everything in a FAT partition having ownership of joe:me and
permissions of 644. Ext partitions have their own permissions, as
expected.

This all Just Works, and I have no idea what configuration it depends
on. "I didn't build this," sid basically builds and rebuilds itself, so
I tend to keep my fingers out of the works. I do know that USB sticks
were a real pain with usbmount, which *sometimes* mounted the entire
device instead of the partitions, and at some point, things just
started working better.

There is nothing in /etc/polkit-1, /etc/udev or /etc/udisks2 referring
to USB sticks, which are the most likely suspects as far as I can see.
Presumably the culprit is systemd, as usual, so possibly someone more
knowledgable about this beast can finish my part-answer.

-- 
Joe



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Richard Owlett

On 11/20/2016 7:29 AM, Brian wrote:

On Sat 19 Nov 2016 at 19:51:06 -0600, Richard Owlett wrote:


On 11/19/2016 5:07 PM, Brian wrote:

On Sat 19 Nov 2016 at 12:51:58 -0600, Richard Owlett wrote:


I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
purpose.
It is to transfer data to/from a Windows machine.
There is NO [nor will there ever be] a network connection between them.


No connection to the internet. No connection to the local network. Has a
Debian machine ever been so emasculated? Plus it has nothing to do with
the problem posed.


When I plug one into my Debian machine I want totally unfettered read/write
access.
[when logged in as root or *ANY* user ID]


The recent thread "parted is ALMOST suitable" has a post
with the line

  Wheezy has /etc/udev/rules.d/91-permissions.rules; Jessie doesn't.

Perhaps if you reread that portion of the thread and ask yourself:

  Wheezy has /etc/udev/rules.d/91-permissions.rules; what would happen
  if Jessie did too?


{any one notice a tone of frustration ;/}


No. But we will waited with baited breath for you to report back on the
suggestion.




*NON SRQUITURE* (s)


Sorry. I took "unfettered read/write" access as a user to mean
partition/format in addition to writing a file to the disk.

Doesn't pmount fit the bill if all you want is to read/write?



No.

Maybe the problem is D.E. specific? I'm using MATE and thus Caja 
as file-manager.

On top menu-bar Places will list identifiers for mountable devices.
Clicking the "identifier" will "mount" the identified device.
It will use information available from /etc/fstab and/or 
pmount.allow .
Neither appears to have an entry equivalent to "any FAT 
filesystem on plugable device".





Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Brian
On Sat 19 Nov 2016 at 19:51:06 -0600, Richard Owlett wrote:

> On 11/19/2016 5:07 PM, Brian wrote:
> >On Sat 19 Nov 2016 at 12:51:58 -0600, Richard Owlett wrote:
> >
> >>I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
> >>purpose.
> >>It is to transfer data to/from a Windows machine.
> >>There is NO [nor will there ever be] a network connection between them.
> >
> >No connection to the internet. No connection to the local network. Has a
> >Debian machine ever been so emasculated? Plus it has nothing to do with
> >the problem posed.
> >
> >>When I plug one into my Debian machine I want totally unfettered read/write
> >>access.
> >>[when logged in as root or *ANY* user ID]
> >
> >The recent thread "parted is ALMOST suitable" has a post
> >with the line
> >
> >  Wheezy has /etc/udev/rules.d/91-permissions.rules; Jessie doesn't.
> >
> >Perhaps if you reread that portion of the thread and ask yourself:
> >
> >  Wheezy has /etc/udev/rules.d/91-permissions.rules; what would happen
> >  if Jessie did too?
> >
> >>{any one notice a tone of frustration ;/}
> >
> >No. But we will waited with baited breath for you to report back on the
> >suggestion.
> >
> 
> 
> *NON SRQUITURE* (s)

Sorry. I took "unfettered read/write" access as a user to mean
partition/format in addition to writing a file to the disk.

Doesn't pmount fit the bill if all you want is to read/write?

-- 
Brian.



Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Richard Owlett

On 11/20/2016 6:33 AM, Nicolas George wrote:

Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :

Not as I read them.


Then you did not read correctly.


https://manned.org/fstab.5 states
"
  The first field (fs_spec).
  This field describes the block special device or remote 
filesystem

  to be mounted.
  ...
  LABEL= or UUID= may be given instead of a device
  name.  This is the recommended method, as device names are 
often a
  coincidence of hardware detection order, and can change 
when other

  disks are added or removed.  For example, `LABEL=Boot' or
  UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.  (Use a 
filesystem-
  specific tool like e2label(8), xfs_admin(8), or 
fatlabel(8) to set

  LABELs on filesystems).

  It's also possible to use PARTUUID= and PARTLABEL=. These
  partitions identifiers are supported for example for GUID
  Partition Table (GPT).
"




They give methods of handling an explicitly specified device.


Tomas' answer contains the solution to your problem: the umask mount
option. This it, no more no less.


On 11/19/2016 2:33 PM, to...@tuxteam.de wrote:


Use the "umask" option when mounting the file system. Umask is
supposed to be the bits *not* to set in the file permissions.

That would be

mount /dev/foo mnt -oumask=000



That works for an explicit value of "foo".

Maybe the problem is D.E. specific? I'm using MATE and thus Caja 
as file-manager.

On top menu-bar Places will list identifiers for mountable devices.
Clicking the "identifier" will "mount" the identified device.
It will use information available from /etc/fstab and/or 
pmount.allow .
Neither appears to have an entry equivalent to "any FAT 
filesystem on plugable device".






To know how to actually use it, re-read Tomas' answer, RTFM, RTFW or
hire a consultant. But you have your answer.






Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Nicolas George
Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :
> Not as I read them.

Then you did not read correctly.

> They give methods of handling an explicitly specified device.

Tomas' answer contains the solution to your problem: the umask mount
option. This it, no more no less.

To know how to actually use it, re-read Tomas' answer, RTFM, RTFW or
hire a consultant. But you have your answer.


signature.asc
Description: Digital signature


Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Richard Owlett

On 11/20/2016 6:11 AM, Nicolas George wrote:

Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :

Those don't address my problem definition.


Yes, they do. Tomas' answer was exactly the correct one to your problem.



Not as I read them.
They give methods of handling an explicitly specified device.
Be it specified by LABEL, UUID, or designation in the /dev/sdX 
hierarchy.


I wish _generic_ handling.
In this use case I _generic_ means "any USB flash device with FAT 
file system".
E.G. when I pick up a flash drive that has information written by 
my Windows machine I have *NO* a priori knowledge of "LABEL, 
UUID, or designation in the /dev/sdX hierarchy."


Something missing somewhere :<  PEBSAK ?





Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Nicolas George
Le decadi 30 brumaire, an CCXXV, Richard Owlett a écrit :
> Those don't address my problem definition.

Yes, they do. Tomas' answer was exactly the correct one to your problem.

-- 
  Nicolas George


signature.asc
Description: Digital signature


Re: Coercing sane file permissions -- site specific

2016-11-20 Thread Richard Owlett

On 11/19/2016 2:33 PM, to...@tuxteam.de wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:

I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
purpose.
It is to transfer data to/from a Windows machine.
There is NO [nor will there ever be] a network connection between
them.

When I plug one into my Debian machine I want totally unfettered
read/write access.
[when logged in as root or *ANY* user ID]


HOW?
{any one notice a tone of frustration ;/}


Use the "umask" option when mounting the file system. Umask is
supposed to be the bits *not* to set in the file permissions.

That would be

   mount /dev/foo mnt -oumask=000

(of course just 0 would suffice. Old rituals and that ;-)

For more options, you separate them with comma, like so

   mount /dev/foo mnt -ouid=richard,gid=richard,umask=003

supposing you want the files to belong to user (uid) "richard" and
group (gid) "richard" and want to take away write perm from others.

The details are in the "mount" man page, under "FILESYSTEM SPECIFIC
MOUNT OPTIONS", "Mount options for fat".

You can set the options in the fstab, if you make an entry there
(fourth field, see man fstab).

regards
- -- t


Those don't address my problem definition.
Having a USB flash drive with a fat16/fat32 file system in hand, 
on inserting drive I wish full read/write access.

After all, a FAT filesystem has no concept of ownership.
What's wrong?




Re: Coercing sane file permissions -- site specific

2016-11-19 Thread Richard Owlett

On 11/19/2016 5:07 PM, Brian wrote:

On Sat 19 Nov 2016 at 12:51:58 -0600, Richard Owlett wrote:


I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
purpose.
It is to transfer data to/from a Windows machine.
There is NO [nor will there ever be] a network connection between them.


No connection to the internet. No connection to the local network. Has a
Debian machine ever been so emasculated? Plus it has nothing to do with
the problem posed.


When I plug one into my Debian machine I want totally unfettered read/write
access.
[when logged in as root or *ANY* user ID]


The recent thread "parted is ALMOST suitable" has a post
with the line

  Wheezy has /etc/udev/rules.d/91-permissions.rules; Jessie doesn't.

Perhaps if you reread that portion of the thread and ask yourself:

  Wheezy has /etc/udev/rules.d/91-permissions.rules; what would happen
  if Jessie did too?


{any one notice a tone of frustration ;/}


No. But we will waited with baited breath for you to report back on the
suggestion.




*NON SRQUITURE* (s)




Re: Coercing sane file permissions -- site specific

2016-11-19 Thread Brian
On Sat 19 Nov 2016 at 12:51:58 -0600, Richard Owlett wrote:

> I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
> purpose.
> It is to transfer data to/from a Windows machine.
> There is NO [nor will there ever be] a network connection between them.

No connection to the internet. No connection to the local network. Has a
Debian machine ever been so emasculated? Plus it has nothing to do with
the problem posed.

> When I plug one into my Debian machine I want totally unfettered read/write
> access.
> [when logged in as root or *ANY* user ID]

The recent thread "parted is ALMOST suitable" has a post
with the line

 Wheezy has /etc/udev/rules.d/91-permissions.rules; Jessie doesn't.

Perhaps if you reread that portion of the thread and ask yourself:

 Wheezy has /etc/udev/rules.d/91-permissions.rules; what would happen
 if Jessie did too?

> {any one notice a tone of frustration ;/}

No. But we will waited with baited breath for you to report back on the
suggestion.

-- 
Brian.



Re: Coercing sane file permissions -- site specific

2016-11-19 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:
> I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
> purpose.
> It is to transfer data to/from a Windows machine.
> There is NO [nor will there ever be] a network connection between
> them.
> 
> When I plug one into my Debian machine I want totally unfettered
> read/write access.
> [when logged in as root or *ANY* user ID]
> 
> 
> HOW?
> {any one notice a tone of frustration ;/}

Use the "umask" option when mounting the file system. Umask is
supposed to be the bits *not* to set in the file permissions.

That would be

  mount /dev/foo mnt -oumask=000

(of course just 0 would suffice. Old rituals and that ;-)

For more options, you separate them with comma, like so

  mount /dev/foo mnt -ouid=richard,gid=richard,umask=003

supposing you want the files to belong to user (uid) "richard" and
group (gid) "richard" and want to take away write perm from others.

The details are in the "mount" man page, under "FILESYSTEM SPECIFIC
MOUNT OPTIONS", "Mount options for fat".

You can set the options in the fstab, if you make an entry there
(fourth field, see man fstab).

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgwtwwACgkQBcgs9XrR2kapJQCdGT1YIv/58eaI49xxqp4SuDV9
WyAAoIEduiIOmQk7TBnAUOt+9kbZg1+/
=wo6m
-END PGP SIGNATURE-