Results 1 to 6 of 6
Thread: CHMOD for files?
-
06-18-2007, 06:36 PM #1Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268
CHMOD for files?
Hi guys,
Sorry for the newbies question, I just moved my folder_A from computer A to computer B, what is the command to change the permission of owner, access, group for every files in that folder_A at 1 time ? Thanks first.
jacobs.
note: in the folder_A has hundred of files.
Let's say , i want to change owner = laptop, access = read and write, group = user, access = read and write , what is the specific command to do that for all the files in folder_A at 1 time ? thanks againLast edited by AndyJ; 06-18-2007 at 06:39 PM.
-
06-18-2007, 06:40 PM #2Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
Change ownership:
chown -R user:group folder_A
Change permission:
chmod -R 644 folder_A
The 644 is just an example, so you will probably want to change that to the correct number. Also, since this is recursive (-R) use with extreme caution.RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
06-18-2007, 06:44 PM #3Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268
-
06-18-2007, 06:49 PM #4Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
Ah, if you want to change ALL of the files within the folder:
cd folder_A
chown -R user:group *
chmod -R 644 *
Just make sure you are in the folder_A directory first.RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
06-18-2007, 07:10 PM #5Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268
by the way, what is user and group in here ?
-
06-18-2007, 09:55 PM #6Disabled
- Join Date
- Aug 2002
- Posts
- 308
[quota]want to change owner = laptop, access = read and write, group = user, access = read and write ,[/quota]
Then you need
cd folder_A
chown -R laptop:user *
chmod -R 644 *