Ubuntu Terminal: How to Make a Folder Writable

It is not often that you need to force a folder in Ubuntu to be writable, usually you only sit with this sort of issue when you want to create a space on your web server for users to upload something to or some other similar reason. Anyway, luckily it is a simple matter to make a folder writable via an Ubuntu terminal instance, making use of the classic chmod functionality.

In practice, to make a folder like /home/uploads writable to all, run:

chmod 777 /home/uploads

The value of 7 indicates read, write and execute permissions, with the first 7 standing for the owner, the second for the group and the final one for everyone else.

And that should pretty much do it, though remember a folder with such open permissions is a pretty risky little beast to have lying around.

Nifty.

Related Posts:

  • Linux (and thus Ubuntu) file access permissions often get in your way if you aren't a power user, but if you have played around with the Ubuntu terminal for long enough, you should by now be aware of the magical CHMOD command and the way in which it can alter file and folder permissions. The most common way of u ...

  • When you find yourself using the terminal in Ubuntu or any other Linux distribution for that matter, it is always pretty handy to know in which directory you are currently working. In Linux terms, this is known as your current working directory. To quickly find out where you are in the system, simply use the pwd ...

  • When using the terminal to navigate your way through your Ubuntu or any other Linux distro, it is actually pretty easy to quickly see how big a particular directory or folder is in terms of size. The command to use is du, short for Disk Usage. It's main purpose is to gather and summarize how much of your disk sp ...

About Craig Lotter

South African software development manager and senior application developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.

One thought on “Ubuntu Terminal: How to Make a Folder Writable

  1. This command does more than make a directory writable. 777 Means it is Readable, Writable and Executable by any user and this is ill-advise for any actual implementation. The appropriate way to make a file writable is as follows:

    chmod ug+w filename

    This makes the filename writable for the owning user and its group. You could also do

    chmod o+w filename

    But this makes it writable to all other users, which would be the same as the 777. I would also look into what the octal references (numbers, ie 777, 620) mean.

Leave a Reply