13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20.3 Be an Enabler, or “Let’s Be Codependent!”449NOTEWe are assuming you are carrying out these steps in sequence and thus yourcurrent working directory is still /usr/local.4. Set directory permissi<strong>on</strong>s <strong>on</strong> /usr/local.You want slightly different permissi<strong>on</strong>s <strong>on</strong> directories. First, you wantthe group to have execute permissi<strong>on</strong> <strong>on</strong> directories. This allows eachmember of the group to make each directory his or her current workingdirectory. See Eric Raym<strong>on</strong>d’s Unix and Internet Fundamentals 6 for a goodbasic introducti<strong>on</strong> to file permissi<strong>on</strong>s <strong>on</strong> UNIX.Also, <strong>on</strong> <strong>Linux</strong> systems, when a user creates a file, that file is, by default,group-owned by the user’s primary group, 7 which is not what wewant here. We want files created by a user in this directory to be groupownedby the local group. To do this, we have to set the setgid bit <strong>on</strong> allthe directories in /usr/local and below. When a user creates a file in adirectory that has the setgid bit set, that file will be group-owned by thegroup-owner of the directory if the user is a member of that group. If theuser is not, it will be group-owned by the user’s default group as usual. Sowe need to set execute and setgid permissi<strong>on</strong>s <strong>on</strong> all the directories in/usr/local and below:# find /usr/local -type d -exec chmod g+xs {} \; -print/usr/local/usr/local/share/usr/local/share/bochs/usr/local/share/bochs/keymaps/usr/local/share/bochs/keymaps/CVS/usr/local/share/doc......etc.6. http://en.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/disk-layout.html#permissi<strong>on</strong>s7. Which is the group ID specified for the user in the /etc/passwd file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!