chmod not working on ntfs file system

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
137
Reaction score
67
Credits
1,287
Hello, I am accessing an ntfs partition which I had setup via ntfs-3g to get access from Ubuntu 22.04.LTS. Unfortunately, I am not able to change the file system rights via chmod 755 DATA2 as shown in the screenshot below. Is there any reason why this is happening? How can I fix this issue?

1709054268569.png
 


What mount options are you using? Do you have fuse installed?
 
How to fix ? Copying the files from NTFS to a Linux organised filesystem of choice, which doesn't include NTFS. It's not because you can see files, that all is OK.
Take the files from NTFS as fast as you can. The Linux OS can also damage your NTFS files and folders, if you try to do things that weren't designed for it.
 
How to fix ? Copying the files from NTFS to a Linux organised filesystem of choice, which doesn't include NTFS. It's not because you can see files, that all is OK.
Take the files from NTFS as fast as you can. The Linux OS can also damage your NTFS files and folders, if you try to do things that weren't designed for it.
I have never never seen linux damage NTFS. Where are you getting this information?
 
Common sense
Do you think the designers of CHMOD were thinking, OK, yes, this tool is working but I think I found a bug yesterday when I mapped my NTFS folder to my <insert preferred Linux distro>
We'll have to wait release of our next distro before we fix this issue with NTFS.

Or Stackoverflow, if that is good enough
 
Common sense
Do you think the designers of CHMOD were thinking, OK, yes, this tool is working but I think I found a bug yesterday when I mapped my NTFS folder to my <insert preferred Linux distro>
We'll have to wait release of our next distro before we fix this issue with NTFS.

Or Stackoverflow, if that is good enough
You are making reference to the system being in hibernate. When linux mounts an NTFS file system and it encounters the existence of the hiberfil.sys file (that is where everything is stored in hibernate) it mounts in read only mode. It will not damage the system. In fact the article you referenced is not official information but is nothing more than people offering opinions and information. The truth is that NTFS is safe in linux. I run into this all the time and I delete the hiberfil.sys file so I get write access and that will force windows to do a "normal" boot next time instead of a "fast boot".
So, no stackoverflow is not good enough I would see actual proof not just people with conflicting information, show me an example of it actually happening. Stack overflow is not "common sense"
 
Maybe I'm not understanding the question but I've never had a problem with NTFS and Fat32 with Linux because Linux sees both.
I have a Shared Folder between my win 7 VM and Linux Mint...I swap files between both all the time. All my Flash Drives are NTFS-ex-Fat/HPFS and one has Ventoy installed on it...created in Linux Mint...never had permission problems.

My portable 1TB SSD is NTFS-ex-Fat/HPFS and has all my Mint Cinnamon backup Images on it...created by Foxclone a Linux Clone and Backup Tool...maybe I'm missing something.
1709093762644.gif
 
I have never never seen linux damage NTFS. Where are you getting this information?
Me neither. I was working before on my old laptop and never any issues by accessing ntfs from linux.
 
What mount options are you using? Do you have fuse installed?
Code:
$ cat /proc/mounts | grep /dev/nvme0n1p3
where the partition is located outputs me
/media/miketlap/DATA2 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
Yes fuse is installed
Code:
fusermount3 version: 3.10.5
 
/media/miketlap/DATA2 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0


 
Maybe I'm not understanding the question but I've never had a problem with NTFS and Fat32 with Linux because Linux sees both.
I have a Shared Folder between my win 7 VM and Linux Mint...I swap files between both all the time. All my Flash Drives are NTFS-ex-Fat/HPFS and one has Ventoy installed on it...created in Linux Mint...never had permission problems.

My portable 1TB SSD is NTFS-ex-Fat/HPFS and has all my Mint Cinnamon backup Images on it...created by Foxclone a Linux Clone and Backup Tool...maybe I'm missing something. View attachment 18611
You are not misunderstanding. We are on a tangent here and somebody "heard" that linux may damage NTFS but offered zero proof other than "common sense" and some website with people making theories. But no actual proof. Just need one time that Linux damaged NTFS. Not that it allowed a user to damage it because users can damage anything.

Off the tangent, the chmod may not have worked if the drive was mounted in read only which is different than the file permissions.
try mounting with this command
sudo mount -t ntfs-3g -o remove_hiberfile /dev/sdaX /mnt/your_mount_point

adjust the sdaX to be the drive you want to mount. "your mount point" is where you want to put it.

The hiberfil.sys file needs to be removed if it exists as if you followed this it causes the drive to mount in read only mode. Deleting the file will lose any unsaved changes in windows and programs, just like pulling the plug.
 
Some official Microsoft documentation. This is mostly WSL, but applies to Linux filesystems in general.


Please keep in mind that you cannot give yourself more access than what you have on Windows, even if the metadata says that is the case. For example, you could set the metadata to display that you have write permissions to a file using chmod 777, but if you tried to access that file you would still not be able to write to it. This is thanks to interoperability, as any read or write commands to Windows files are routed through your Windows user permissions.

This is disabled on purpose. Think about it. What would keep me, from mounting a Windows filesystem I shouldn't have access to and making changes to files on the Windows system. This would be a huge security flaw.
 
The chmod command is used to change the permissions of a file or directory, while the chown command is used to transfer the ownership of a file or directory to another user or group.

I am thinking you should probably use chown instead of chmod since the partition is most likely used by root and would require changing ownership
 
Some official Microsoft documentation. This is mostly WSL, but applies to Linux filesystems in general.




This is disabled on purpose. Think about it. What would keep me, from mounting a Windows filesystem I shouldn't have access to and making changes to files on the Windows system. This would be a huge security flaw.
I'm sorry, did you say "This would be a huge security flaw" on windows? say it isn't so. You are saying that windows has security flaws? You can use Linux to access a windows file system with full access to everything. That is how we fix windows using Linux

Windows IS A SECURITY FLAW
 
I'm sorry, did you say "This would be a huge security flaw" on windows? say it isn't so. You are saying that windows has security flaws? You can use Linux to access a windows file system with full access to everything. That is how we fix windows using Linux

Windows IS A SECURITY FLAW

How true.
1709165340593.gif


A few years ago...a guy with a windoze Laptop told me this laptop has an uncrackable password.
1709165530327.gif


I booted to my Mint live session and mounted his windoze internal HDD...should have seen the look on his face...priceless.
1709165866433.gif
 
I booted to my Mint live session and mounted his windoze internal HDD..
You might have had even more fun... you could have downloaded chntpw into your live Mint USB... and you could have changed his Windows password and locked him out! :oops:

I think... it's been along time since I've used it. It may be you can only delete (blank) his password so that you can get in with no password. It's already in the Linux Mint repos, or you can find it here. Anyway, chntpw is a cool tool to learn. Yes, sometimes I am evil. ;)

It's another good example that if you have (or can get) physical access to a computer... you can do almost anything you want. You may not break encryption, but you can erase an encrypted drive. Permissions have little value in situations like this, it seems to me.
 
Last edited:
You might have had even more fun... you could have downloaded chntpw into your live Mint USB... and you could have changed his Windows password and locked him out! :oops:

I think... it's been along time since I've used it. It may be you can only delete (blank) his password so that you can get in with no password. It's already in the Linux Mint repos, or you can find it here.

Anyway, chntpw is a cool tool to learn. :cool: Yes, sometimes I am evil. ;)
I use chntpw often for people that forget windows passwords. You are correct that you can blank the password and activate the admin account but you can't change the password. Until of course you activate the admin account and log in with that then change it.
 
It seems chntpw hasn't been updated since 2014...it is in the Mint Software Manager but doesn't work.

As long as I know how to reset a forgotten password in Linux I'm good and all that requires is the live session and the Terminal...of cause I have my user password written down too.
m1213.gif
 

Members online


Top