Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Bash Shell & Perl Library Path

by Anonymous Monk
on Jun 28, 2009 at 03:10 UTC ( [id://775409]=note: print w/replies, xml ) Need Help??


in reply to Re: Bash Shell & Perl Library Path
in thread Bash Shell & Perl Library Path

How can I set it globally for everyone?

Replies are listed 'Best First'.
Re^3: Bash Shell & Perl Library Path
by tomfahle (Priest) on Jun 28, 2009 at 07:48 UTC

    For Login-Shells its /etc/bash.bashrc - This is is the system-wide version of the ~/.bashrc file. Ubuntu is configured by default to execute this file whenever a user enters a shell or the desktop environment.

    See https://help.ubuntu.com/community/EnvironmentVariables for the glory details.

      But that won't help if the /home/myname directory is not crossable for other users. It depends on the Linux distribution. Some set mode 0755 (rwxr-xr-x) for user directories, others 0751 (rwxr-x--x), 0750 (rwxr-x---), or even 0700 (rwx------). Some distributions stuff all users into a group named users, others create a new group for each new user. I don't know what Ubuntu does. If all users are in the same group, the directory must be group crossable (chmod g+x), if users are in different groups, it must be world crossable (chmod o+x). The perl_modules subdirectory needs at least these permmissions, and perhaps also read permissions are required. (chmod g+r or chmod o+r).

      Anyway, this looks like a stupid idea to me. Global resources don't belong into user directories. Do we have an XY Problem here?

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        > But that won't help if the /home/myname directory is not crossable for other users. 
        

        But it will. Permissions on user directories make no difference in this case - /etc/bash.bashrc is the system-wide initialization file for Bash; the only times it isn't read is if the shell is a login shell or the '--norc' or '--rcfile other_init_file' options are specified.

        I do agree that this may be a case of the XY problem, though. It sounds like using a 10-ton hydraulic press to smash a fly - since modifying system-wide init files should be reserved for absolute emergencies and treated with utmost care.


        --
        "Language shapes the way we think, and determines what we can think about."
        -- B. L. Whorf
Re^3: Bash Shell & Perl Library Path
by Anonymous Monk on Jun 28, 2009 at 05:04 UTC
    Install the module as root

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://775409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found