Permissions of /local

When I partitioned this time, I gave home a 30GB section, and thought ‘local’ sounded fine to allocated the other 30GB section, I planned to put programs and media in it.

Naturally it’s fallen under the root permission only of many other filesystem directories.

As it at least appears not to be used for anything in the same way /bin /etc would be except for a ‘lost and found’ folder.

I can manually copy things into /local of course using the terminal, but my concern is that these things would be hard to modify (updates, saves, etc) in a folder with tight permissions.

However, it does remain that this lofty, empty, folder, was allocated 30GBs.

Is there a SAFE way of creating a new directory called /local with the lost and found in it, whilst changing the permissions and title of the original so it becomes a normal storage directory in the home folder?

That’s what I’d do at the moment - as root change the permissions of the current folder, move it to a user-friendly location, and as soon as possible recreate the original folder (albeit without 30GB of space!) to be used by the system…

Many thanks.

Simplest is simply to make subdirectories under it and change the owner of those directories to yourself.

sudo mkdir /local/music
sudo chown boot_boy:users /local/music

Then you can do whatever you want underneath as yourself.

Remember this: in normal Unix/Linux filesystems, all files and directories have ownership and permissions.

:slight_smile: Thank you very much. I’m grateful for the info, and will put it into action!

On 2010-10-16 13:36, Boot Boy wrote:
>
> When I partitioned this time, I gave home a 30GB section, and thought
> ‘local’ sounded fine to allocated the other 30GB section, I planned to
> put programs and media in it.
>
> Naturally it’s fallen under the root permission only of many other
> filesystem directories.
>
> As it at least appears not to be used for anything in the same way /bin
> /etc would be except for a ‘lost and found’ folder.
>
> I can manually copy things into /local of course using the terminal,
> but my concern is that these things would be hard to modify (updates,
> saves, etc) in a folder with tight permissions.
>
> However, it does remain that this lofty, empty, folder, was allocated
> 30GBs.
>
> Is there a SAFE way of creating a new directory called /local with the
> lost and found in it, whilst changing the permissions and title of the
> original so it becomes a normal storage directory in the home folder?
>
> That’s what I’d do at the moment - as root change the permissions of
> the current folder, move it to a user-friendly location, and as soon as
> possible recreate the original folder (albeit without 30GB of space!) to
> be used by the system…

I don’t understand all that you say, so I’ll explain what I think you need to know.

Say you used the partitioner to create an ext4 partition mounted at /local. The filesystem
configuration file /etc/fstab will have a line for it, more or less like this one:


LABEL=localstorage /local  ext3  defaults  1 2

As default, only Mr Root can write to it. You want to write to it as user. There are may ways. First
step is to look at its permissions:


# ls -l / | grep local
drwxr-xr-x  10 root root  4096 Sep 28 18:48 local

You can change it so that it belongs to the group “users”, and so that users can write to it, and
nobody else. Well, do this:


chgrp users /local
chmod g+w,o-r-x /local

What do those commands mean? Well, you look it up in the manual :slight_smile:

Some other thing: You do not touch, create or delete the “lost+found” directory. It is created when
you format the partition as ext2, 3 or 4.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thank you Carlos!

I used the first method (creating a folder within the partition, and then
chown username:users /directory.

However I will learn what I can from your reply, ie: looking up g+w,o-r-x and ls -l / | grep in the manual.

Many thanks!