editing file/folder ownership

infinityBBC

Registered
something kinda kooky happened to me last night. i was logged into my own machine as admin, and i was transferring some pix from a digital camera. i saves the files inside a folder that i created on my desktop.

since i was doing this for a friend who has his own log in on my machine, i then decided i'd log out and let him log in and do his iPhoto cropping/editing on his account. i then dragged the entire folder into his Public Drop Box. i was prompted if i wanted to do this, as "i wouldn't be able to see the results" (or something like that). i assumed this was simply because i didn't have priveliges to open his drop box (which seems strange alone, since i'm an admin & he's not!). nevertheless, i knew i didn't need to see them later from my account, so i allowed the folder to go into his drop box anyway.

ok... the kooky thing... i logged out, and logged him in... the folder & files were there. the problem is that it won't let me move the folder/files out of that drop box! the ONLY thing it would let me do is copy the files (only) to another location, so i copied them to the desktop and all is good with the files, but afterward, i couldn't even delete the files residing in their created folder inside the drop box.

it kept saying i (my friend) didn't have enough priveliges to do this (move/trash). the next thing i tried was to change my friend's account to admin status. that alone produced no different error message. then, while his account was admin, i tried getting info on the folder/files and attempted to change ownership, since this seemed to be the only reason i was not allowed to do anything with them while logged into his account.

i'm assuming, if there is SOME way to change ownership i will be able to delete these files/folder. if anyone has any ideas about this, PLEASE let me know.

also, it seems CRAZY that this CAN happen! i don't know if it's something new in the latest 10.1.3 software i upgraded to just prior to this event, but i don't remember this kind of thing happening before. is this some sort of bug that Apple might not know about? it seems that if one copies ANY file/folder to another person's account drop box, ownership should immediately change.

anyway, thanks for any help on the subject. i just hope the only way to delete the files isn't some confusing command line. i don't work well unless there's a GUI!

:cool:
 
I've had problems like this before with FTP. I would download folders and they would be under my name but the group would be set to "Unknown" instead of "staff" which is the normal group when you create a new account. So, when I would put the folders in a place where evryone could get to them they couldn't be opened by other users because the group setting was wrong.

You might want to try Super Get Info. I don't think it will help you delete the files, but it will let you fix the group setting before you move the folder to another account. I'm thinking you'll have to go to the command line to delete the stuff. I'm no unix whiz. Someone else may know a better way.
 
here is what I recomend:

Create a directory for all your real users to share files in.

First create a group called 'everyone'
Launch NetInfo. Authenticate your self (click the little lock in the lower left hand corner).
navigate to /groups
click 'groups'. Now press apple-n
click in the plain below (Directory: new_directory). Rename the field 'new_directory' (accross from 'name') to 'everyone'.
Now, insert a new property:
apple-shift-n
Name it 'passwd' and make its property '*'
here's what else you have to add:
property | value(s)
gid | 2000 (use any number not currently in use).
users | root
| kilowatt
|you
|your friend
(press option-apple-a to add additional values to a property). Now, select from the option's menu 'restart netinfo'. Then quit netinfo.


in the terminal:
mkdir /everyone
sudo chown :everyone /everyone
chmod 775 /everyone

now, if you're really feeling nice:

sudo ln -s /everyone ~buddy/everyone
sudo ln -s /everyone ~you/everyone
this creates symlinks for you and youre buddy to the directory.


So, now you have a spot where any user in the group 'everyone' can put files. And, anyone else can read there.

this is a great option to do with music, too.
 
heh lol just remembered:

I think, in bsd and bsd-like systems, every real user is in a group called 'staff'. So, skip the netinfo part, and replace every instance of 'everyone' with 'staff'. Except for the directory names and symlink name - those are up to you.
enjoy!
 
Back
Top