Opened 16 years ago

Closed 16 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:
Platform: All

Description

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 by anevilyak, 16 years ago

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 by bga, 16 years ago

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

comment:3 by anevilyak, 16 years ago

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 by axeld, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev27414.

Note: See TracTickets for help on using tickets.