Slightly OT: Setting privileges on OS-X

Ton Kuypers tkuypers at pandora.be
Fri Oct 21 13:19:30 EDT 2005


Sarah,

I knew I had to use the chmod command, but thanks to you it is up and  
running :-))

Many thanks for your help!

Ton


On 20-okt-05, at 01:16, Sarah Reichelt wrote:

>> Are there Unix-wizzkids out there?
>>
>> I've created a small RR app that creates a bunch of standard folders
>> (like the list below) where users can drop job-related items in.
>>
>> Now I need to secure these folders, but not the content...
>> The folders I create may not be deleted by a user, only by the owner,
>> which will be me :-)) but the users are allowed to create new folders
>> or files in the basic folders. These files and folders they should be
>> able to change, delete, rename, etc.
>>
>>
>
> Hi Ton,
>
> I don't claim to be a Unix-wizzkid at all, but I have learnt some
> stuff about privileges.
>
> Each file or folder in Unix / OS X has 3 sets of privileges: owner,
> group & guest.
> There are 3 settings in each set: read, write and execute (r, w & x).
>
> If you open a Terminal window and type "ls -l" and press Return, you
> will see a list of items in the current folder. The first section of
> the data shows the current privilege settings.
> Here is an example:
> -rwxr-xr-x    a file where the owner can do anything (rwx) , the group
> can read & execute but not write (r-x) and guests (anyone else) can
> also read & execute but not write (r-x).
>
> If the first character was "d" instead of "-", then it would be a
> folder (directory).
>
> To change these settings, you need to use the "chmod" command.
> To add write privileges for all users to a file, use a command like  
> this:
>      chmod a+w filename
> To remove write privileges, use this:
>     chmod a-w filename
>
> However this does not stop people deleting your files or folders. To
> make a folder "sticky" i.e. make it so that users other than the owner
> can only add files and not delete them, use this command:
>     chmod +t foldername
>
> To make files undeletable, I would use an AppleScript to toggle their
> "locked" setting:
> Here is an example that asks for a file, then locks it so it cannot  
> be deleted.
>
> tell application "Finder"
>     set tFile to choose file
>     set the locked of file tFile to true
> end tell
>
> I hope this helps, but please email me directly if you think I can be
> of any further assistance.
>
> Sarah
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>




More information about the use-livecode mailing list