[haiku-bugs] Re: [Haiku] #12334: MediaConvert does not check for read only target directory (easy)

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Sun, 05 Mar 2017 22:44:08 -0000

#12334: MediaConvert does not check for read only target directory (easy)
-------------------------------------------+----------------------------
   Reporter:  pulkomandy                   |      Owner:  Barrett
       Type:  bug                          |     Status:  assigned
   Priority:  normal                       |  Milestone:  R1
  Component:  Applications/MediaConverter  |    Version:  R1/Development
 Resolution:                               |   Keywords:
 Blocked By:                               |   Blocking:
Has a Patch:  1                            |   Platform:  All
-------------------------------------------+----------------------------

Comment (by axeld):

 `access()` is not enough for this check! If you mount a writable file
 system read-only, it will still report the actual file permissions, not
 the effective ones. If you really want to know whether or not you can
 write in a certain position, you need to check if it's a read-only volume,
 first. It's the same on Linux, BTW.

 In this particular case, IIRC the permissions in the packagefs are set in
 the package themselves; I think we have an open bug report that those are
 messed up when you build Haiku with a weird umask. Not sure if that only
 affects files, or directories as well, but I assume the latter.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12334#comment:13>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: