[Bug 10396] New: test -w should return false on a R/O fs as root

bugzilla at busybox.net bugzilla at busybox.net
Wed Oct 11 19:48:11 UTC 2017


https://bugs.busybox.net/show_bug.cgi?id=10396

            Bug ID: 10396
           Summary: test -w should return false on a R/O fs as root
           Product: Busybox
           Version: 1.27.x
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: hobbitalastair at yandex.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

According to POSIX.1-2008:

"When a file is to be read or written, the file shall be opened with an access
mode corresponding to the operation to be performed. If file access permissions
deny access, the requested operation shall fail."

However, if a filesystem is mounted R/O, then the "root can write to any file"
assumption (coreutils/test.c#603) fails, and test -w returns true even if the
file is not actually writeable. This differs from the behaviour of bash, which
correctly returns false.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list