You are not logged in.

#1 2011-01-25 19:08:31

rnabioullin
Member
Registered: 2010-10-02
Posts: 24

Why does /usr/local/src have a restrictive mode?

I do not understand why /usr/local/src has a restrictive mode (755) - compiling as root is not a good practice.

Offline

#2 2011-01-25 19:18:10

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Why does /usr/local/src have a restrictive mode?

755 is rwxr-xr-x if I'm not mistaken. I don't see the problem.

EDIT:
To prevent a long list of questions...

1. Everything outside your ~/ or /tmp or /pub should not have anything above xx5. Only root should be able to write those files. In addition, root files usually don't belong to a group that should be able to write to such files. There might be exeptions.

2. You don't use the /usr/local/src/ folder to compile packages, you use it to store your own source code, make it available to other users of the system. If you need something from there, copy it to your ~.

3. See 1. and 2.

Last edited by Awebb (2011-01-25 19:31:34)

Offline

#3 2011-01-25 19:33:45

rnabioullin
Member
Registered: 2010-10-02
Posts: 24

Re: Why does /usr/local/src have a restrictive mode?

Symbolically, yes, but the directory is owned by root. Therefore, users other than root lack writing privileges; consequently, those users are unable to compile in that directory.

Offline

#4 2011-01-25 19:53:44

rnabioullin
Member
Registered: 2010-10-02
Posts: 24

Re: Why does /usr/local/src have a restrictive mode?

I see, so in the typical case root would download a software package to /usr/local/src and a non-root user would copy it to his/her home directory and build it there (including a user who has root privileges, who would then install to /usr/local/ as root, if a system-wide installation is desired). Thanks for elucidating the typical use.

Offline

Board footer

Powered by FluxBB