Allow other user to see just one directory in my user folder

2

I want to store mysql and postgres database dirs under my user folder, so is it possible to allow other users (_mysql and postgres) to access just directories they need (like ~/var/mysql and ~/var/postgres) using ACL without allowing them to see contents of other directories/files. If I add postgres allow list,search to ~ then postgres can read everything inside my user folder with read permission set for others. Or is it generally a bad idea and I'd better use folder outside my home folder to store such things?

tig

Posted 2010-11-22T04:57:49.273

Reputation: 3 906

Answers

1

is it generally a bad idea and I'd better use folder outside my home folder to store such things
you said it...just switch is and it
that's a yes....generally a bad idea, although i see it crop up on boards ALL the time. how do i let service X operate in this single subdirectory of my home?

RobotHumans

Posted 2010-11-22T04:57:49.273

Reputation: 5 758

I found that by default user folder has read permission for others (I assume that I changed this some time ago), so maybe it is ok especially if I am the only user of my mac, also I can block access to folders just disabling read access for others. – tig – 2010-11-23T23:44:49.063

1

From your tags, you are using OS X? Go to the Sharing preference pane of System Preferences and enable File Sharing. You can add any folder to the list to be shared, and select which users and groups have which permissions on it.

MJeffryes

Posted 2010-11-22T04:57:49.273

Reputation: 1 292

That enables network sharing, to let users on other computers mount the folder(s) remotely. Changing the folder permissions there does the same thing as changing them with the Finder's Get Info window. – Gordon Davisson – 2010-11-22T19:09:18.140

Oh right, I assumed that was what the poster wanted to do. Nevertheless, it shows that Apple endorses allowing other users read-only access to directories in the ~ folder means it's probably OK to do. – MJeffryes – 2010-11-22T19:56:09.710