Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #180718

Re: Only root can write on USB disk

From Curt <curty@free.fr>
Newsgroups linux.debian.user
Subject Re: Only root can write on USB disk
Date 2017-05-05 13:00 +0200
Message-ID <tDJ7P-CE-1@gated-at.bofh.it> (permalink)
References <tCHhM-7T4-15@gated-at.bofh.it> <tCIxc-wA-13@gated-at.bofh.it> <tDHz3-8aB-1@gated-at.bofh.it> <tDHSq-8hz-19@gated-at.bofh.it>
Organization Unorganized

Show all headers | View raw


On 2017-05-05, <tomas@tuxteam.de> <tomas@tuxteam.de> wrote:
>
> On Fri, May 05, 2017 at 09:17:51AM +0000, Curt wrote:
>> On 2017-05-02, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
>> > On Tue, May 02, 2017 at 07:16:57PM +0430, Mostafa Shahverdy wrote:
>> >> I have a very annoying problem. I can't write to my usb drives (fat32,
>> >> ntfs, etc.) without root permissions. How can I fix this?
>> >
>> > Mount the file system with "-o uid=youruser" to have the files presented
>> > by the kernel as being "owned" by that user.
>> >
>> >
>> 
>> I don't understand that advice entirely.
>> 
>> Isn't there a difference between mounting the device as a regular user
>> and writing to the device as a regular user (which you might be
>> prevented from doing if the filesystem had root-only write permissions,
>> thus Brian's ls -l suggestion to eliminate that possibility)?
>
> There is a difference. The "-o=foo" advice is betting on the file system
> being one without ownership info (i.e. a lower life form ;-)

The OP does mention FAT32, and FAT32 doesn't have permissions, I hear,
so in the case of a FAT32 file system on a usb stick any user at all
should be able to write to it (given the appropriate mount options)?

However, ntfs does have some sort of permission system, I believe.

What about the permissions on the directory under which the mount is
eventually made? That could affect the right to write, right? 

> Once mounted, the operating system just "assumes" some ownership and
> permission info. The "user=" and "group=" options give you some say
> in it.
>
> The option "user" on the fstab just allows a regular user to activate
> a mount according to said entry (however perms & ownership of the "end
> result" might look like).
>
> The two things are (somewhat) orthogonal (if I understood your question
> correctly).

I think you did, thanks.

> cheers
> - -- t
>
>


-- 
"It might be a vision--of a shell, of a wheelbarrow, of a fairy kingdom on the
far side of the hedge; or it might be the glory of speed; no one knew." --Mrs.
Ramsay, speculating on why her little daughter might be dashing about, in "To
the Lighthouse," by Virginia Woolf.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Only root can write on USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-05-02 16:50 +0200
  Re: Only root can write on USB disk Greg Wooledge <wooledg@eeg.ccf.org> - 2017-05-02 18:10 +0200
    Re: Only root can write on USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-05-04 14:00 +0200
    Re: Only root can write on USB disk Curt <curty@free.fr> - 2017-05-05 11:20 +0200
      Re: Only root can write on USB disk <tomas@tuxteam.de> - 2017-05-05 11:40 +0200
        Re: Only root can write on USB disk Curt <curty@free.fr> - 2017-05-05 13:00 +0200
          Re: Only root can write on USB disk <tomas@tuxteam.de> - 2017-05-05 13:40 +0200
  Re: Only root can write on USB disk Mostafa Shahverdy <mostafa@mostafa.info> - 2017-05-04 17:30 +0200
    Re: Only root can write on USB disk Greg Wooledge <wooledg@eeg.ccf.org> - 2017-05-04 18:20 +0200
    Re: Only root can write on USB disk Lisi Reisz <lisi.reisz@gmail.com> - 2017-05-04 18:20 +0200
    Re: Only root can write on USB disk Brian <ad44@cityscape.co.uk> - 2017-05-04 20:10 +0200
    Re: Only root can write on USB disk Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-05-04 20:30 +0200
  Re: Only root can write on USB disk Stefan Monnier <monnier@iro.umontreal.ca> - 2017-05-05 15:00 +0200

csiph-web