Jump to content

User access to folders


nastyhome
 Share

14 posts in this topic

Recommended Posts

Hi all,

 

Quick one:

 

How do I allow\restrict access to partitions, folders to different users?

 

(ie: admin gets full access to all folders and partitions, while a user will get some access to some folders and partitions)...

 

Note: These partitions are mounted NTFS partitions.

 

Many thanks.

Link to comment
Share on other sites

Note: These partitions are mounted NTFS partitions.

 

Are you worried about users reading something they shouldn't or writing over some file? If you're worried about them overwriting or deleting something, don't worry. NTFS volumes are mounted read-only, so no changes can be made to them. If you're worried about someone reading something they shouldn't, then as far as I know there's nothing you can do. Mac OS X automounts just about anything, including CDs, DVDs, iPods, and, yes, NTFS partitions. If we were talking about Linux, I'd advise you to edit the /etc/fstab file and allow only one user/group access to the partition. However, that file doesn't exist on Mac OS X. Anyone know if/where MacOS X has a filesystem table?

Link to comment
Share on other sites

Are you worried about users reading something they shouldn't or writing over some file? If you're worried about them overwriting or deleting something, don't worry. NTFS volumes are mounted read-only, so no changes can be made to them. If you're worried about someone reading something they shouldn't, then as far as I know there's nothing you can do. Mac OS X automounts just about anything, including CDs, DVDs, iPods, and, yes, NTFS partitions. If we were talking about Linux, I'd advise you to edit the /etc/fstab file and allow only one user/group access to the partition. However, that file doesn't exist on Mac OS X. Anyone know if/where MacOS X has a filesystem table?

 

If you want me to say p0rn - then say so!

 

Yes, i do understand NTFS is read-only. But what if I had FAT32 partitions for that matter.

 

Or I have one folder for one particular user to view but dont allow access to another user...

 

It could personal pictures, private chat logs, business documents and oh yes....p0rn :)

 

I think in an enterprise environment, how do we manage file permissions with Mac OS X?

 

1. The point of this excercise is I just want to allow\restrict access to files\folders\partitions.

 

And I havent gone anywhere with this.

 

2. Does the Server edition contain tools to manage this?

Link to comment
Share on other sites

Good stuff...

 

I read them both and yet to play with it...

 

Might even download OS X Server to have a GUI to do this, rather than the tedious command line...

 

"The only requirement that Apple makes — besides Tiger, of course — is that the volume be formatted as HFS+. Since ACEs are stored in extended attributes (see “Stored in Metadata” above) Apple needs an HFS+-formatted drive to store the entries"

 

Permissions will only work for HFS+ partitions...

 

How about NTFS partitions?

 

Does anyone know how to hide a partition? I want t be able to hide a NTFS partition from Mac OS X...from specific user...

 

Any ideas?

Link to comment
Share on other sites

Create a file called rc.local in the /etc directory:

sudo nano /etc/rc.local

Put the following in the file:

my_user=`whoami`		<-- note the back quotes: `  not '
if [ $my_user = "bob" ]; then
diskutil unmount disk0s1
diskutil unmount disk0s2
fi
if [ $my_user = "fred" ]; then
diskutil unmount disk1s3
fi

Be sure to set permissions:

 

sudo chown root:wheel /etc/rc.local
sudo chmod 755 /etc/rc.local

In the file above, "disk0s1", "disk0s2", "disk1s3" are partitions you want to hide.

 

"disk0" is the first disk drive, "disk1" is 2nd disk drive, etc.

 

"s1" is the first partition on the drive, "s2" is the 2nd partition, etc.

 

And "bob" and "fred" are the usernames of the users.

 

Adjust your file as necessary.

Link to comment
Share on other sites

The script doesnt quite work.

 

In fact, I dont even know if it works.

 

Sometimes my first harddrive, disk0s1 is mounted...

 

Sometimes my second harddrive, disk1s1 is mounted...

 

Sometimes both are mounted...

 

Does it need some sudo command or something else?

 

Any ideas?

Link to comment
Share on other sites

 Share

×
×
  • Create New...