Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.