Opened 11 years ago

Closed 11 years ago

#2670 closed bug (fixed)

Directories created using Tracker have wrong permissions.

Reported by: bga Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Tracker Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


When a directory is created through Tracker, its permissions bits are set to 777. Maybe it is not respecting the default umask? Anyway, creating a directory through the terminal creates it with permissions 644, which are more like it.

Change History (5)

comment:1 Changed 11 years ago by anevilyak

How is that incorrect? Directories use the execute bit to indicate that traversal is allowed. If anything, 755 or 777 would be correct, 644 is definitely not.

comment:2 Changed 11 years ago by bga

Yes, I meant to say 755 and they are created with 777.

comment:3 Changed 11 years ago by anevilyak

From a quick glance, FSCreateNewFolder just uses BDirectory::CreateDirectory(), which does indeed hardcode the permissions:

        // create the dir
        status_t error = _kern_create_dir(fDirFd, path,
                S_IRWXU | S_IRWXG | S_IRWXO);

Where are you expecting it to pick up the permissions from?

comment:5 Changed 11 years ago by axeld

Resolution: fixed
Status: newclosed

Fixed in hrev27414.

Note: See TracTickets for help on using tickets.