Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

natlinxz

macrumors newbie
Original poster
Okay, so I have been using my parents OS X login primarily for my computer life. I have made videos, played games, etc. using one account. But I decided to make my own account, and have had some success transferring files. However, the permissions are still set to the other account. So in iMovie, I can watch my videos but not edit them, since I have read-only permissions. I could easily go into finders "get info" menu and change permissions, but I have hundreds upon hundreds of imovie projects. So, how can I change the permissions of hundreds of files at a time? Editing the folders permission didn't work.
 
Prepare to be amazed at the power of the command line! 🙂

For this you need a Terminal (which resides in the /Applications/Utilities folder).

There you can type:

ls -al (that's two 'ell's, by the way)

which will give you a long (detailed) listing of all the files and directories (aka folders) in your current directory.

Then you can try:

man chmod

and

man chown

which will give you the manual pages for the commands change file mode (permissions) and change file ownership.

You probably want to change the ownership rather than messing with groups or allowing read/write access to everyone.

chown -R myname *

will recursively change the ownership all files (and directories) in the current directory to myname. Recursively means that it'll then do the same in each directory and in each directory in those directories and ...


Let me know if that's not clear.


colin

PS. oh, other useful commands are pwd for 'print working directory', cd [dir] for 'change directory [to dir] or your home directory', locate for finding things, less (which is like more, but better) and ...

PPS. And if you want to know all commands available (and read the man pages for all of them) you can get them using the command completion feature: type a TAB TAB (ie. 'a' and then the TAB key twice). That will offer a list of all possible commands starting with 'a'. Then do the same with b to z 🙂

... pretty soon you'll be piping and grepping and will be a command line expert.
 
Prepare to be amazed at the power of the command line! 🙂

For this you need a Terminal (which resides in the /Applications/Utilities folder).

There you can type:

ls -al (that's two 'ell's, by the way)

which will give you a long (detailed) listing of all the files and directories (aka folders) in your current directory.

Then you can try:

man chmod

and

man chown

which will give you the manual pages for the commands change file mode (permissions) and change file ownership.

You probably want to change the ownership rather than messing with groups or allowing read/write access to everyone.

chown -R myname *

will recursively change the ownership all files (and directories) in the current directory to myname. Recursively means that it'll then do the same in each directory and in each directory in those directories and ...


Let me know if that's not clear.


colin

That was very helpful, thank you! It didn't work though. 🙁
After doing the "chown -R username *" thing, It went through a long list of files, and kept saying "operation not permitted". NOOO!
 
That was very helpful, thank you! It didn't work though. 🙁
After doing the "chown -R username *" thing, It went through a long list of files, and kept saying "operation not permitted". NOOO!

If your account has administrator access do this.

sudo chown -R username *

This will execute the command with root/(administrator) rights.
 
Aaaah. OK.

From the man page for chown:

For obvious security reasons, the ownership of a file may only be altered by a super-user. Similarly, only a member of a group can change a file's group ID to that group.

Rats!

OK, so you would need to prefix that with a sudo like this:

sudo chown -R username *

(see man sudo)

for which you need the password of an Administrator or root, depending on how your system is set up.

sorry

😡
 
Thank you everyone for your help, it has really been useful in making my new user account. However, I downloaded a program called BatChmod, which allows permissions to be changed on every file within a directory. I'm absolutely hopeless at using Terminal, so the interface in BatChmod helped me a lot.

Thanks again!
 
Thank you everyone for your help, it has really been useful in making my new user account. However, I downloaded a program called BatChmod, which allows permissions to be changed on every file within a directory. I'm absolutely hopeless at using Terminal, so the interface in BatChmod helped me a lot.

Thanks again!

I was about to post the same thing. Works like a charm. While you're all here, 😉 anybody know how to keep file permissions open or convert them when putting files to a server? I have to run BatChmod all the time on our server because people put stuff on it and the permissions lock other users out from using the files. Looking for a way to make it so when anything is copied to the server, the permission automatically become read/write for everyone.
 
I was about to post the same thing. Works like a charm. While you're all here, 😉 anybody know how to keep file permissions open or convert them when putting files to a server? I have to run BatChmod all the time on our server because people put stuff on it and the permissions lock other users out from using the files. Looking for a way to make it so when anything is copied to the server, the permission automatically become read/write for everyone.

you can either look into umask, acl, or using groups may be you're best and easiest option.

http://osxfaq.com/Tutorials/LearningCenter/AdvancedUnix/ugp/index.ws
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.