Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools

Omar Farag
Omar Farag
4,573 Points

Point of ownership in CMS

When you use chmod to change the ownership of the file, whats the point of it? I can always use chmod to grant ownership back to me. Also, what if I was the user being granted ownership, and I didn't wan't to own it? Any answers?

1 Answer

Sue Dough
Sue Dough
35,800 Points

I am unsure what you mean by CMS which usually means content management system. This is unix specific and any CMS that runs on Unix will face this.

The point is to have the proper file permissions. You may want visitors on your site to view a file. However would you want them to execute that file? No you probably wouldn't. For example chmod 777 everything on your site and it will be hacked so fast. Would you want them to be able to view a sensitive config file? Probably not.

Also another point is some things in Unix have to be executable to run. You may not be able to run a script if you don't have execution privileges.

If the user didn't want it they could delete the file? I am unsure what type of situation this would come up in. If a user creates another user and assigns them files, than that’s that. What you do with those files is your choice.