Change permissions to mounted ntfs drive Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Change permissions to mounted ntfs drive

Post by przemko »

Hello, I connect second external drive HDD Seagate 6TB USB(with power supply) and want to add that drive as nfs share to my laptop. I did it with my first drive Toshiba 3TB HDD USB. That 6TB drive is formated as NTFS and it has root permissions. I change permissions to dietpi but after reboot it has root permissions again. It's possible to change that permanently and do I have to change some parameters in my ubuntu laptop fstab and dietpi fstab if that drive is ntfs?

Ubuntu laptop:

Code: Select all

 
# <file system>                             <dir>   <type>   <options>  <dump>	<pass>
192.168.0.24:/mnt/Toshiba/dietpi_userdata /mnt/nas  nfs      defaults    0       0
192.168.0.24:/mnt/Seagate /mnt/Seagate nfs      defaults    0       0
Dietepi:

Code: Select all

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=907af7d0-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=907af7d0-01 /boot vfat noatime,lazytime,rw 0 2
UUID=362a51c8-387b-4315-a814-8c3c2dd05f94 /mnt/Toshiba ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
UUID=60296AD270314115 /mnt/Seagate ntfs noatime,lazytime,rw,permissions,big_writes,nofail,noauto,x-systemd.automount
Regards,
Przemek
User avatar
Joulinar
Posts: 3135
Joined: Sat Nov 16, 2019 12:49 am

Re: Change permissions to mounted ntfs drive

Post by Joulinar »

Hi,

there is a big difference between your 2 HDD. First one is ext4 file system while your 2nd is NTFS. On Unix-like operating systems such as Debian, you can run chown and chmod on ntfs file systems but they aren't going to have any effect on the actual permissions. Does the file system absolutely need to be ntfs? I would recommend ext4 if you like to use user permission.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Change permissions to mounted ntfs drive

Post by przemko »

Hi, I can format that drive but already have 1,6 TB of data and I took very long to copy from Toshiba drive. But if it's not possible to change permissions I will do that. I will format to ext4.

Regards,
Przemek
User avatar
WarHawk
Posts: 667
Joined: Thu Jul 20, 2017 8:55 am

Re: Change permissions to mounted ntfs drive

Post by WarHawk »

I was trying to mount a nfs and sshfs to test the docker of jellyfin (and failing miserably)

You might need to add ,uid=xxx,gid=xxx to the mount options...and remove defaults means it will always mount as root, make sure you use , (comma) with no spaces...also have it connected to mouse/KB/monitor in case fstab goes ape and doesn't work

Did a quick google...you can specify mount options
https://askubuntu.com/questions/113733/ ... -etc-fstab
uid=1000,gid=1000,dmask=027,fmask=137
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Change permissions to mounted ntfs drive

Post by przemko »

Thanks guys for help but I format that drive. If I would have problems with this disk later with this ntfs, I prefer to format and tire a bit with data transfer now.
Thanks for Your time and help.
Regards,
Przemek
User avatar
Joulinar
Posts: 3135
Joined: Sat Nov 16, 2019 12:49 am

Re: Change permissions to mounted ntfs drive

Post by Joulinar »

Better to use ext4 if the disk is used on Linux based systems only.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Change permissions to mounted ntfs drive

Post by przemko »

Hi, I format that drive but I noticed that is mounted and has root permissions. My first HDD has dietpi permissions, that because I had dietpi_userdata on it? Do I have now t change permissions to that new drive to:
```
sudo chmod - R 777 /mnt/Seagate
sudo chown -R dietpi:dietpi /mnt/Seagate
```

I will have on it folder where I will make backup of my local laptops with deja-dup and second where I will make dietpi-sync my dietepi_userdata folder from /mnt/Toshiba.

regards,
Przemek
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Change permissions to mounted ntfs drive

Post by przemko »

@Joulinar I change permissions but still cannot mount that drive in my Ubuntu Laptop. I do everything like my Toshiba drive.

Code: Select all

drwxrwxrwx 4 dietpi dietpi 4096 Dec 20 22:07 Seagate
drwxr-xr-x 5 dietpi dietpi 4096 Mar 23  2020 Toshiba
Ubuntu:

Code: Select all

lusia@lusia-laptop:~$ sudo mount -t nfs -vvvv 192.168.0.24:/mnt/Seagate/ /mnt/Seagate/
[sudo] hasło użytkownika lusia: 
mount.nfs: timeout set for Mon Dec 21 18:56:03 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.24,clientaddr=192.168.0.229'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=192.168.0.24'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.0.24 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.0.24 prog 100005 vers 3 prot UDP port 33514
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.0.24:/mnt/Seagate/
Dietpi /etc/fstab:

Code: Select all

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=907af7d0-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=907af7d0-01 /boot vfat noatime,lazytime,rw 0 2
UUID=362a51c8-387b-4315-a814-8c3c2dd05f94 /mnt/Toshiba ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
UUID=53e894de-6174-4b2e-9258-3508270674a9 /mnt/Seagate ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
User avatar
Joulinar
Posts: 3135
Joined: Sat Nov 16, 2019 12:49 am

Re: Change permissions to mounted ntfs drive

Post by Joulinar »

did you add the new drive to /etc/exports on your NFS server?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
przemko
Posts: 146
Joined: Sun Mar 15, 2020 5:40 pm

Re: Change permissions to mounted ntfs drive

Post by przemko »

Hi, I don't remember I make something like that with my Toshiba drive.

Code: Select all

root@DietPi:/# cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
Post Reply