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!

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 Console Foundations Users and Permissions File Permissions

Jenna Malone
Jenna Malone
7,173 Points

I can't add the write permission to the hello.txt file


I'm having a problem adding the write permission to the hello.txt file. I am adding the code like he said to which is " chmod o+w hello.txt "

When I run this and then run " ls -l " it doesn't show that the write permission was added.

same here

1 Answer

Hi there

Only the owner of the file can apply permission changes ( so you'll need to be logged in as the treehouse user )

If you're already logged in we can retrieve feedback from the console with the -v option (verbose) which outputs information to the console about executed commands.

So, you can try:

chmod -v o+w hello.txt

It may inform you of as to why you cannot change the permissions and give some indication on how to resolve it.

Alternatively, you can run it as an admin using sudo

sudo chmod o+w hello.txt

Hope you find this helpful!