emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60291: closed (chmod a-r does not fail for vfat)


From: GNU bug Tracking System
Subject: bug#60291: closed (chmod a-r does not fail for vfat)
Date: Sat, 24 Dec 2022 06:00:02 +0000

Your message dated Fri, 23 Dec 2022 21:59:10 -0800
with message-id <5a985f62-e56e-4bd5-cde9-49b1bba2dd9a@cs.ucla.edu>
and subject line Re: bug#60291: chmod a-r does not fail for vfat
has caused the debbugs.gnu.org bug report #60291,
regarding chmod a-r does not fail for vfat
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60291: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60291
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: chmod a-r does not fail for vfat Date: Sat, 24 Dec 2022 02:09:57 +0100
chmod (GNU coreutils) 9.1 x86_64

cd /tmp
dd if=/dev/zero of=fd0 count=2880
echo 'drive a:
        file="/tmp/fd0' >.mtoolsrc
mformat a:
umask 0022
udisksctl loop-setup -f fd0
udisks mount /dev/loop3p1
cd /run/media/dell/1F9D-2F6C
echo >a.txt
chmod a-r a.txt && stat a.txt

Expected: chmod: unsupported permissions
Got: -r--r--r--
This is wrong because the command chmod had failed to set the permissions as 
required but it had claimed to have succeeded.

Similarly, chmod a-w and chmod o+w should succeed but chmod a+w should fail 
(because the result is o+w).






--- End Message ---
--- Begin Message --- Subject: Re: bug#60291: chmod a-r does not fail for vfat Date: Fri, 23 Dec 2022 21:59:10 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
On 12/23/22 17:09, Krzysztof Żelechowski wrote:
chmod a-r a.txt && stat a.txt

Expected: chmod: unsupported permissions
Got: -r--r--r--
This is wrong because the command chmod had failed to set the permissions

The chmod command is doing the right thing; the problem lies elsewhere. Run "strace chmod a-r a.txt". You should see something like "fchmodat(AT_FDCWD, "a.txt", 0200) = 0" which means chmod told the kernel to change a.txt's permissions to -w------- and the kernel responded that it did so successfully.

The problem here is a squirrelly filesystem. Run "man ntfs-3g" and look for "Access Handling and Security".



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]