hanj Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/104414163441b8c6c1a6b4e.gif)
Joined: 19 Aug 2003 Posts: 1500
|
Posted: Sat Dec 11, 2004 7:28 am Post subject: |
|
|
chown - changes ownership (be careful)
Code: | chown apache:apache /var/www/localhost/htdocs -R |
This would recusively change ownership to owner apache and the group apache in the htdocs directory.
chmod - changes permissions (be careful) , read, write, execute to owner, group and everyone. Directories need to have execute, and executable scripts.. need to obviously be executable. Depending on what you want you'll probably want 755 on the directories (giving read+write+execute to the owner, read+execute to the group, and read+execute to everyone)
Code: | chmod 755 /var/www/localhost/htdocs |
Make sure you understand what you're doing, cause it can have serious impact on your box. You always want to be careful with ownership and permissions!
Learn to use man. There are good man pages for chmod and chown.
Code: | man chmod
man chown |
Here is a web calculator to assign proper permissions on files or directories.. this may help
http://search.able2know.com/About/1225.html
hanji |
|