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


Groups > linux.debian.user > #242446

Re: Impossible to give "write" permission on a sub folder

From Chuck Zmudzinski <brchuckz@netscape.net>
Newsgroups linux.debian.user
Subject Re: Impossible to give "write" permission on a sub folder
Date 2021-11-27 19:50 +0100
Message-ID <DoaVP-2m8-1@gated-at.bofh.it> (permalink)
References <DnEVX-9O-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Read the ntfs-3 man page.

Take a look at the man page for ntfs-3g, the section on
Access Handling and Security:

 From the ntfs-3g man page:
------------------------------------------------------------
    Access Handling and Security
        By default, files and directories are owned by the effective 
user and group of the mounting process,  and  ev‐
        erybody  has  full read, write, execution and directory browsing 
permissions.  You can also assign permissions
        to a single user by using the uid and/or the gid options 
together with the umask, or fmask and dmask options.

        Doing so, Windows users have full access to the files created by 
ntfs-3g.

        But, by setting the permissions option, you can benefit from the 
full ownership and  permissions  features  as
        defined  by  POSIX.  Moreover, by defining a Windows-to-Linux 
user mapping, the ownerships and permissions are
        even applied to Windows users and conversely.

        If ntfs-3g is set setuid-root then non-root users will be also 
able to mount volumes.
------------------------------------------------------------

You use the defaults option when mounting. I do not know how that
affects access and security for ntfs-3g. I would suggest either using
uid and gid options when mounting instead, or using the
usermapping file that maps Windows users to Debian users.

You need to check which user under Windows owns those folders, which Windows
users have write access to those folders, etc.

As mentioned in the man page, there is a way to map Windows users to
Debian 11 users using the default .NTFS-3G/UserMapping file or a
custom usermapping file with the usermapping mount option.

I used this feature a long time ago, and the format for the usermapping
file is documented in the ntfs-3g man page.

As is said at the beginning of this reply, read the ntfs-3g man page!

HTH,

Chuck

On 11/26/2021 3:29 AM, lists.debian@netc.eu wrote:
> Hello to all,
> I have a dual boot PC with Windows 10 and Debian 11
> This PC has 2 drives, one SSD that has both operating systems and a 
> HDD where I store all other files (documents, music, images, ...)
> The goal is to share this HDD between Windows and Debian. To do it, I 
> added the following line to the fstab file:
>
>     UUID=ACB23705B236D414 /mnt/windows  ntfs-3g defaults,umask=000  
>      0   0
>
> the folders lount without any problem to /mnt/windows, all with the 
> correct permission settings (rwx) :
>
>     $ ls -l /mnt/windows/
>     total 80
>     drwxrwxrwx 1 root root 4096 14 nov. 20:20 '$RECYCLE.BIN'
>     drwxrwxrwx 1 root root 4096 24 nov. 15:59 CloudStation
>     drwxrwxrwx 1 root root 4096 21 nov. 11:44 Documents
>     -rwxrwxrwx 1 root root 8192 25 juin 08:15 DumpStack.log.tmp
>     drwxrwxrwx 1 root root 4096 22 nov. 20:41 Images
>     drwxrwxrwx 1 root root 4096 24 nov. 11:53 Music
>     drwxrwxrwx 1 root root 8192 23 nov. 06:21 'System Volume Information'
>     drwxrwxrwx 1 root root 40960 21 nov. 22:22 Downloads
>     drwxrwxrwx 1 root root 4096 21 nov. 19:44 Videos
>
> My problem is that in some sub folders, I'm not getting the write 
> ("w") permission. For example on the "Documents" one:
>
>     $ ls -l /mnt/windows/Documents/
>     total 117
>     drwxrwxrwx 1 root root 16384 24 nov. 15:59 User1
>     -rwxrwxrwx 1 root root 0 26 nov. 2020 Default.rdp
>     -rwxrwxrwx 1 root root 432 11 mars 2021 desktop.ini
>     dr-xr-xr-x 1 root root 40960 24 nov. 15:59 User2
>     drwxrwxrwx 1 root root 16384 24 nov. 16:00 Public
>     drwxrwxrwx 1 root root 4096 24 nov. 15:59 User3
>     dr-xr-xr-x 1 root root 20480 21 nov. 12:05 Scan
>     -rwxrwxrwx 1 root root 18432 4 déc. 2016 Thumbs.db
>     drwxrwxrwx 1 root root 0 16 nov. 23:13 'Unified Remote'
>
> Most of the folders are OK, but I ave User2 and San that doesn't have 
> the write ("w") permission...
> Do you have any idea on whats going on?
> Thanks in advance for all the help,
> Berst regards,
> Marc

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


Thread

Impossible to give "write" permission on a sub folder lists.debian@netc.eu <lists.debian@netc.eu> - 2021-11-26 09:40 +0100
  Re: Impossible to give "write" permission on a sub folder rhkramer@gmail.com - 2021-11-26 13:00 +0100
  Re: Impossible to give "write" permission on a sub folder Brian <ad44@cityscape.co.uk> - 2021-11-26 20:40 +0100
    Re: Impossible to give "write" permission on a sub folder Greg Wooledge <greg@wooledge.org> - 2021-11-26 20:40 +0100
      Re: Impossible to give "write" permission on a sub folder Kenneth Parker <sea7kenp@gmail.com> - 2021-11-26 22:00 +0100
        Re: Impossible to give "write" permission on a sub folder Charles Curley <charlescurley@charlescurley.com> - 2021-11-26 23:30 +0100
          Re: Impossible to give "write" permission on a sub folder David <bouncingcats@gmail.com> - 2021-11-27 04:10 +0100
    Re: Impossible to give "write" permission on a sub folder "Andrew M.A. Cater" <amacater@einval.com> - 2021-11-27 12:20 +0100
  Re: Impossible to give "write" permission on a sub folder David Christensen <dpchrist@holgerdanske.com> - 2021-11-26 22:00 +0100
  Re: Impossible to give "write" permission on a sub folder Chuck Zmudzinski <brchuckz@netscape.net> - 2021-11-27 19:50 +0100
    Re: Impossible to give "write" permission on a sub folder lists.debian@netc.eu <lists.debian@netc.eu> - 2021-11-28 17:50 +0100
      Re: Impossible to give "write" permission on a sub folder David Wright <deblis@lionunicorn.co.uk> - 2021-11-28 22:20 +0100
        Re: Impossible to give "write" permission on a sub folder lists.debian@netc.eu <lists.debian@netc.eu> - 2021-11-29 23:30 +0100
          Re: Impossible to give "write" permission on a sub folder David Wright <deblis@lionunicorn.co.uk> - 2021-11-30 05:50 +0100

csiph-web