0

Hello im new using Ubuntu.

I try to change permission from directory in mounted drive but always back to root or user while run command 'chmod'.

i already try this command :

sudo mount -t ntfs -o username=user,rw,uid=1000,gid=1000 /dev/sda1 /media/user/Disk 

with this command It was successful but failed again and I don't know why. oh fyi I used a drive from a previous Windows Server operating system. so maybe the type here is NTFS. And now im using Ubuntu 22.04.

So what should I add or change in my command? Or am I working on something that has nothing to do with the problem I have? If yes, can you tell me a possible way to change the permissions with chmod or chown if necessary. Of course, access is set to 770 (drwxrwx---) to all directories on the drive. Sorry if my English isn't very good.

1 Answer 1

0

As NTFS is a Windows file system, it does not support Unix permissions. mount plays around this by mounting it with a static "permission mask". You could change that to change the permissions for the whole mounted drive.

Rewriting your command, that would make sudo mount -t ntfs -o username=user,rw,uid=1000,gid=1000,mode=777 /dev/sda1 /mnt/drive

Notice the mount point: /media is for automatic udisks mounts, not for manual ones. You'd probably have to manually create it with sudo mkdir -p /mnt/drive

2
  • Thanks for answer my question. @Savchenko I Already try your answer but no change. Humm maybe my mistake not given full detail. File System Type drive after mounted is fuseblk. i dont know how to solve this problem. I already create a static point mount like your answer in /mnt/drive and using mode=777 in command mount. Commented Nov 30, 2023 at 7:24
  • The probem is unsolvable. The entire mounted drive is always owned by the uid stated in the mount command. NTFS literally has nowhere in the file system of that drive to store any owner or permission details, even though you give full directory write permissions. Commented Nov 30, 2023 at 9:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.