Cannot chown, chmod on mounted ntfs partition
I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2
When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,errors=remount-ro,permissions 0 2
What shall I do to mount the partition properly?
mount fstab ntfs
add a comment |
I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2
When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,errors=remount-ro,permissions 0 2
What shall I do to mount the partition properly?
mount fstab ntfs
1
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can runchown
andchmod
onntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to bentfs
?
– Nasir Riley
Dec 27 '18 at 20:05
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
Thepermissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on anntfs
filesystem but it will have no effect.
– Nasir Riley
Dec 28 '18 at 20:28
add a comment |
I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2
When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,errors=remount-ro,permissions 0 2
What shall I do to mount the partition properly?
mount fstab ntfs
I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2
When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.
PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7 /mnt/mounted_drive ntfs-3g defaults,errors=remount-ro,permissions 0 2
What shall I do to mount the partition properly?
mount fstab ntfs
mount fstab ntfs
edited Dec 27 '18 at 19:59
asked Dec 27 '18 at 10:41
icepopo
1112
1112
1
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can runchown
andchmod
onntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to bentfs
?
– Nasir Riley
Dec 27 '18 at 20:05
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
Thepermissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on anntfs
filesystem but it will have no effect.
– Nasir Riley
Dec 28 '18 at 20:28
add a comment |
1
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can runchown
andchmod
onntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to bentfs
?
– Nasir Riley
Dec 27 '18 at 20:05
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
Thepermissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on anntfs
filesystem but it will have no effect.
– Nasir Riley
Dec 28 '18 at 20:28
1
1
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can run
chown
and chmod
on ntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to be ntfs
?– Nasir Riley
Dec 27 '18 at 20:05
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can run
chown
and chmod
on ntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to be ntfs
?– Nasir Riley
Dec 27 '18 at 20:05
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
The
permissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on an ntfs
filesystem but it will have no effect.– Nasir Riley
Dec 28 '18 at 20:28
The
permissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on an ntfs
filesystem but it will have no effect.– Nasir Riley
Dec 28 '18 at 20:28
add a comment |
1 Answer
1
active
oldest
votes
With NTFS-3G, setting the owning user and group seems only to be possible when a UserMapping file containing a mapping for the targeted user/group is present. This is not really clear from the documentation, but I'm testing it just now and that is what is happening.
If compatibility with an existing Windows installation is not needed, create an empty file .NTFS-3G/UserMapping
on the mounted partition and fill it via:
getRUI4() { od -An -N4 -tu4 /dev/random | tr -d ' '; }
USERMAPPING=/media/NTFS_PARTITION/.NTFS-3G/UserMapping
echo ":users:S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-513" | sudo tee -a $USERMAPPING >/dev/null
echo "$(id -un):$(id -gn):S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-1001" >> sudo tee $USERMAPPING >/dev/null
If you want to use existing Windows SIDs, you can instead use the program ntfsusermap
on an unmounted (!) partition, which will interactively ask you to specify user- and group-names (do not need to be numeric, regardless of the message) for given paths where it first finds an as of yet unmapped ID. This is quick to do.
User and group root
is mapped by default, as is other
. The above lines will create a mapping for users
group, and the current user. Repeat as necessary.
Also, in my case, I mount the drive with the options
no_def_opts,allow_other,acl,nodev,nosuid,big_writes,hide_dot_files
However, in your case you should not need any of them, although I find that these options improve upon the default, as otherwise for instance chown/chmod
fail silently in case of errors.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491098%2fcannot-chown-chmod-on-mounted-ntfs-partition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
With NTFS-3G, setting the owning user and group seems only to be possible when a UserMapping file containing a mapping for the targeted user/group is present. This is not really clear from the documentation, but I'm testing it just now and that is what is happening.
If compatibility with an existing Windows installation is not needed, create an empty file .NTFS-3G/UserMapping
on the mounted partition and fill it via:
getRUI4() { od -An -N4 -tu4 /dev/random | tr -d ' '; }
USERMAPPING=/media/NTFS_PARTITION/.NTFS-3G/UserMapping
echo ":users:S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-513" | sudo tee -a $USERMAPPING >/dev/null
echo "$(id -un):$(id -gn):S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-1001" >> sudo tee $USERMAPPING >/dev/null
If you want to use existing Windows SIDs, you can instead use the program ntfsusermap
on an unmounted (!) partition, which will interactively ask you to specify user- and group-names (do not need to be numeric, regardless of the message) for given paths where it first finds an as of yet unmapped ID. This is quick to do.
User and group root
is mapped by default, as is other
. The above lines will create a mapping for users
group, and the current user. Repeat as necessary.
Also, in my case, I mount the drive with the options
no_def_opts,allow_other,acl,nodev,nosuid,big_writes,hide_dot_files
However, in your case you should not need any of them, although I find that these options improve upon the default, as otherwise for instance chown/chmod
fail silently in case of errors.
New contributor
add a comment |
With NTFS-3G, setting the owning user and group seems only to be possible when a UserMapping file containing a mapping for the targeted user/group is present. This is not really clear from the documentation, but I'm testing it just now and that is what is happening.
If compatibility with an existing Windows installation is not needed, create an empty file .NTFS-3G/UserMapping
on the mounted partition and fill it via:
getRUI4() { od -An -N4 -tu4 /dev/random | tr -d ' '; }
USERMAPPING=/media/NTFS_PARTITION/.NTFS-3G/UserMapping
echo ":users:S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-513" | sudo tee -a $USERMAPPING >/dev/null
echo "$(id -un):$(id -gn):S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-1001" >> sudo tee $USERMAPPING >/dev/null
If you want to use existing Windows SIDs, you can instead use the program ntfsusermap
on an unmounted (!) partition, which will interactively ask you to specify user- and group-names (do not need to be numeric, regardless of the message) for given paths where it first finds an as of yet unmapped ID. This is quick to do.
User and group root
is mapped by default, as is other
. The above lines will create a mapping for users
group, and the current user. Repeat as necessary.
Also, in my case, I mount the drive with the options
no_def_opts,allow_other,acl,nodev,nosuid,big_writes,hide_dot_files
However, in your case you should not need any of them, although I find that these options improve upon the default, as otherwise for instance chown/chmod
fail silently in case of errors.
New contributor
add a comment |
With NTFS-3G, setting the owning user and group seems only to be possible when a UserMapping file containing a mapping for the targeted user/group is present. This is not really clear from the documentation, but I'm testing it just now and that is what is happening.
If compatibility with an existing Windows installation is not needed, create an empty file .NTFS-3G/UserMapping
on the mounted partition and fill it via:
getRUI4() { od -An -N4 -tu4 /dev/random | tr -d ' '; }
USERMAPPING=/media/NTFS_PARTITION/.NTFS-3G/UserMapping
echo ":users:S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-513" | sudo tee -a $USERMAPPING >/dev/null
echo "$(id -un):$(id -gn):S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-1001" >> sudo tee $USERMAPPING >/dev/null
If you want to use existing Windows SIDs, you can instead use the program ntfsusermap
on an unmounted (!) partition, which will interactively ask you to specify user- and group-names (do not need to be numeric, regardless of the message) for given paths where it first finds an as of yet unmapped ID. This is quick to do.
User and group root
is mapped by default, as is other
. The above lines will create a mapping for users
group, and the current user. Repeat as necessary.
Also, in my case, I mount the drive with the options
no_def_opts,allow_other,acl,nodev,nosuid,big_writes,hide_dot_files
However, in your case you should not need any of them, although I find that these options improve upon the default, as otherwise for instance chown/chmod
fail silently in case of errors.
New contributor
With NTFS-3G, setting the owning user and group seems only to be possible when a UserMapping file containing a mapping for the targeted user/group is present. This is not really clear from the documentation, but I'm testing it just now and that is what is happening.
If compatibility with an existing Windows installation is not needed, create an empty file .NTFS-3G/UserMapping
on the mounted partition and fill it via:
getRUI4() { od -An -N4 -tu4 /dev/random | tr -d ' '; }
USERMAPPING=/media/NTFS_PARTITION/.NTFS-3G/UserMapping
echo ":users:S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-513" | sudo tee -a $USERMAPPING >/dev/null
echo "$(id -un):$(id -gn):S-1-5-21-$(getRUI4)-$(getRUI4)-$(getRUI4)-1001" >> sudo tee $USERMAPPING >/dev/null
If you want to use existing Windows SIDs, you can instead use the program ntfsusermap
on an unmounted (!) partition, which will interactively ask you to specify user- and group-names (do not need to be numeric, regardless of the message) for given paths where it first finds an as of yet unmapped ID. This is quick to do.
User and group root
is mapped by default, as is other
. The above lines will create a mapping for users
group, and the current user. Repeat as necessary.
Also, in my case, I mount the drive with the options
no_def_opts,allow_other,acl,nodev,nosuid,big_writes,hide_dot_files
However, in your case you should not need any of them, although I find that these options improve upon the default, as otherwise for instance chown/chmod
fail silently in case of errors.
New contributor
edited 6 hours ago
New contributor
answered 6 hours ago
gimpf
1012
1012
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f491098%2fcannot-chown-chmod-on-mounted-ntfs-partition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
On Unix-like operating systems such as Linux, MacOS, BSD, etc, you can run
chown
andchmod
onntfs
filesystems but they aren't going to have any effect on the actual permissions. Does the filesystem absolutely need to bentfs
?– Nasir Riley
Dec 27 '18 at 20:05
I've read that the permissions option in fstab entry allows you to use permissions but without compatibility with windows, which I don't need. It seemed to work with the second mount. In the future I am planning to reformat the partition to ext4, but currently don't have free space to backup the data.
– icepopo
Dec 28 '18 at 8:04
The
permissions
option just allows permissions and rights to be set with individual files and options inside which is default. The command will work on anntfs
filesystem but it will have no effect.– Nasir Riley
Dec 28 '18 at 20:28