Impossible edit permission of folders

Tried command

sudo mount -t ntfs3 -o rw,auto,user,umask=0666 /dev/sda6 /mnt/DATI 

that has strange effect. Partition is mounted but permission is affected permanently by command line permission.

First case:
sudo mount -t ntfs3 -o rw,auto,user,umask=0666 /dev/sda6 /mnt/DATI
then
sudo chmod -R 777 /mnt/DATI
all files seems read/write from now and on. Even if I unmount and mount partition.

Second case:
sudo mount -t ntfs3 -o rw,auto,user,umask=0666 /dev/sda6 /mnt/DATI
then
sudo chmod -R 700 /mnt/DATI
all files aren’t accesible from now and on. Even if I unmount and mount partition.

Then it seems that
sudo mount -t ntfs3 -o rw,auto,user,umask=0666 /dev/sda6 /mnt/DATI
mount partition but doesn’t set permission.

That is because umask just controls the default permissions for files/directories created after the NTFS volume is mounted. So it set the default permissions for when you create a new file. Then the owner or the admin can modify it at his pleasure:
https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html

Also @bero suggested to remove user option because " there’s no point in passing user without a parameter".

Then any suggestion about “mount” options to have all files with permission “rw” for all users and groups? Is it better using dmask and fmask?
Is it useful to add “execute” permission too?

@bero suggests to use:

sudo mount -t ntfs3 -o auto,rw,umask=0 /dev/sda6 /mnt/DATI

This will set 666 permission to all new file and 777 permissions for all new directories. For al files already there you can set permissions with chmod -R, as you have already done. Or if you wish different permission between files and directories:

find /mnt/DATI -type f - exec chmod 0666 '{}' \;
find /mnt/DATI -type d - exec chmod 0777 '{}' \;

execute permission is uniseful for file, except unix binaries or script, but is mandatory for directories, unless you cannot open them.

This command

sudo mount -t ntfs3 -o auto,rw,umask=0 /dev/sda6 /mnt/DATI

mount ntfs partition and I can use it (read and write), but it need root password every boot.
I’ll search a software with GUI to mount partition at boot.

Is there an entry in /etc/fstab that would do this for every boot?

Maybe:

/dev/sd6 /mnt/DATI ntfs3 -o auto,rw,umask=0

That is a guess. It is late here and I am tired. But there should be a way to do this in /etc/fstab.

Very strange behaviour.
I make folder DATI in /mnt folder with read and write permission for all. This is what I see just after boot:

[giorgio@openmandriva-x8664 mnt]$ ls -la
total 12
drwxr-xr-x  3 root root 4096 Jan 27 13:41 .
dr-xr-xr-x 21 root root 4096 Dec 16 14:11 ..
drwxrwxrwx  2 root root 4096 Jan 27 19:12 DATI

Then I installed gnome-disk-utility, a gui software to manage partitions and set it to mount ntfs partition at boot in /mn/DATI.
Here’s the row added to /etc/fstab
LABEL=DATI /mnt/DATI auto nosuid,nodev,nofail,x-gvfs-show 0 0
This is what I see just after boot:

[giorgio@openmandriva-x8664 mnt]$ ls -la 
total 20
drwxr-xr-x  3 root root  4096 Jan 27 13:41 .
dr-xr-xr-x 21 root root  4096 Dec 16 14:11 ..
drwx------  1 root root 12288 Dec 15 09:06 DATI

Permission of DATI has changed and now only root can access.
Using Dolhpin as root (kdesu dolphin) no way to change permissions, I get this error message

Could not modify the ownership of file ...
....
You have insufficient access to the file to perform the change.

In Dolphin (opened as normal user) I select DATI and unmount it. And permission go back to previous situation:

[giorgio@openmandriva-x8664 mnt]$ ls -la 
total 12
drwxr-xr-x  3 root root 4096 Jan 27 13:41 .
dr-xr-xr-x 21 root root 4096 Dec 16 14:11 ..
drwxrwxrwx  2 root root 4096 Jan 27 19:12 DATI

I have two questions:

  1. why gnome-disk-utility change permission of DATI?
  2. most important: why Dolphin with root privilege (kdesu dolphin) can’t change permissions? Is there any action that root can’t do?

uh? The line suggested by @ben79 doesn’t work?

I have never used this, but AFAIK gnome-disk-utility is a front-end to udev so It mounts devices in _userspace_which is slower than kernelspace used by ntfs3.

I have a dual installation (windows 11 and OM rolling). the partition opens perfectly, which means it is mounted.

Not tried because Ben was not sure and I can’t risk with all my data.
If you think isn’t risky I’ll try.

I used it because it mount partition at boot it has the same problem with KDE Partition Manager.
Anyway is it normal that it edit permissions I can’t change as root?

One of thiese should works (it is just a mater of taste to use the partition path or its label):

/dev/sd6 /mnt/DATI ntfs3 default,umask=0 0 0
LABEL=DATI /mnt/DATI ntfs3 default,umask=0 0 0

If not, just remove the default option.
Finally when it work, you may take a look here and check if there are some other option you may need, eg. nohidden, sys_immutable, hide_dot_files, windows_names, prealloc or discard (the latter for SSD only).

Waiting for answer I tried Ben suggestion and during boot my system hang and no graphic interface, only command line giving root password!
Same with your first line.
Not easy form me to comment both rows in etc fstab but when commented boot goes well again.
Just to check this is my /etc/fstab at present:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=1433-F888                              /boot/efi   vfat    umask=0077          0 2 
UUID=a3dd0636-75e3-40a1-ad19-24240cf36c86   /           ext4    noatime,discard     0 1 
tmpfs                                       /tmp        tmpfs   noatime,mode=1777   0 0 

#/dev/sd6 /mnt/DATI ntfs3 -o auto,rw,umask=0
#/dev/sd6 /mnt/DATI ntfs3 default,umask=0 0 0

with two last row commented to complete boot.

I’m sorry, you’re right: the device is /dev/sda6. So the correct line is

/dev/sda6 /mnt/DATI ntfs3 umask=0 0 0

or, if you with to use label instead:

LABEL=DATI /mnt/DATI ntfs3 umask=0 0 0

I should have noticed too if I checked better.
Anyway I modified my fstab and this row works:

/dev/sda6 /mnt/DATI ntfs3 umask=0 0 0

I tried this also that doesn’t works:

/dev/sda6 /mnt/DATI ntfs3 default,umask=0 0 0

Then now I have my ntfs partition mounted at boot that solve my main problem. Thanks.

But in my opinion is not clear why using kwrite as root (kdesu kwrite) ther is no way to change permission. May be this is a bug.

Solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.