sontek ( John M. Anderson )

July 4, 2008

Advanced file permissions in Linux

Filed under: GNOME, Linux, SUSE — Tags: , , , , , , — sontek @ 2:06 pm

A lot of Linux/openSUSE users aren’t aware that there are more to file system permissions than the obvious Owner, Group, Other / Read, Write, Execute setup.

All major Linux file systems (ext3, reiserfs, etc) support access control lists (ACL) and its very easy to use them.

To see if a file or directory has an ACL set on it, you can use ls:

inspidell:~ # ls -ld /home/sontek

You’ll get output similar to this:

drwxr-xr-x+ 55 sontek users 4096 JulĀ  4 13:42 /home/sontek

The + at the end of the permissions means that we are using extended permissions (ACL’s). To get the list of ACL’s on the file/directory, run the getfacl <file> command.

inspidell:~ # getfacl /home/sontek
getfacl: Removing leading '/' from absolute path names
# file: home/sontek
# owner: sontek
# group: users
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group:users:---
default:mask::r-x
default:other::r-x

This shows both the ACL’s and the basic Linux permissions.

To modify or set ACL’s you use the setfacl command. Here are a few examples of how to use it:

Grant a single user read access to a directory in your home directory.
setfacl -m u:mom:r /home/sontek/photos

Remove all access from a group on a file
setfacl -x g:developers payroll.xml

You can also copy a set of permissions from one file to another
getfacl file1 | setfacl --set-file=- file2

Remove all ACL’s
setfacl -k /home/sontek

For those of you who are not console jockey’s, you’ll realize quickly that the default nautilus setup doesn’t have a way to view, modify, or add any ACL’s, to get this support you’ll need to install two packages, with opensuse you do this with zypper:

inspidell:~ # zypper in eiciel nautilus-eiciel

Before the ACL permissions show up in nautilus, you’ll have to restart it:

inspidell:~ # pkill nautilus

After this, you’ll be greeted with a very easy to use dialog for modifying ACL’s:
Screenshot of FACL permissions

another great nautilus permissions tip I learned from Christer Edwards is to enable advanced permissions in nautilus, this is a much better UI for managing permissions and should probably be the default.

gconftool-2 --type bool --set /apps/nautilus/preferences/show_advanced_permissions True

A screenshot of this in action:

Screenshot of nautilus advanced permissions

I hope this helps you better secure and manage your computer with the more advanced features your Linux file systems both from console and inside GNOME.

July 2, 2008

Get the changelog of a package with rpm

Filed under: Linux, RPM, SUSE — Tags: , , , , — sontek @ 2:59 am

Ever run system updates in Linux (i.e openSUSE) and get a package that doesn’t seem to be changed and wonder why the update was pushed? Or just interested in following the latest changes to some of your favorite Linux packages?

With rpm you can view all the latest changes in an easily to read format. To get the changelog of a package with rpm you do the following:

$ rpm -q --changelog <package> | less

replace <package> with whatever ever package you would like to see the changelog for (i.e rpm -q –changelog banshee-1 | less)

This is for rpm based Linux distributions (i.e openSUSE, Redhat)

July 1, 2008

Get build dependencies with zypper

Filed under: Linux, SUSE — Tags: , , — sontek @ 11:59 pm

When you are working with the source of a new package on openSUSE and aren’t familiar with all of its dependencies, it gets quite annoying running the normal Linux autconf commands–./autogen.sh, install missing dependency, rinse, wash, and repeat–until you finally have everything you need installed.

zypper makes this easy for us with the following command:

$ sudo zypper si -d <package>

You replace <package> with whatever package’s build dependencies you need.

June 22, 2008

Achieve Zen with openSUSE 11.0 (i.e Get rid of pulse audio)

Filed under: Linux, SUSE — Tags: , , , , — sontek @ 3:23 pm

I’ve been having a lot of stability issues with openSUSE 11.0 lately and the majority of them boiled down to audio.

Here is a list of a few:

1. VLC required root to have audio, wtf?
2. Sound would crash after listening to any audio for an extended period of time (music, video, flash).
3. If my audio crashed, Firefox could not start up until I did rcalsasound restart
4. Some videos were slow/choppy.

So, you are probably asking, how did I fix all these issues?

zypper rm alsa-plugins-pulse
zypper addlock alsa-plugins-pulse

This removes the alsa plugin for pulse and locks it so it will never install again. Without the alsa plugin installed, the apps go back to using alsa directly. This has fixed every issue I’ve had with openSUSE 11.0 so far.

June 9, 2008

Official OpenSUSE Forums

Filed under: Linux, SUSE — Tags: , , — sontek @ 11:00 pm

Great news! The official openSUSE forums are finally here, combining the awesome communities from suseforums.net, suselinuxsupport.de and the openSUSE support forums at forums.novell.com.

If everyone could try to spend a half hour each day browsing the forums to help new users, it would benefit the whole community. openSUSE is growing fast and these forums fill a huge gap in our community for new users.

Without further adieu, http://forums.opensuse.org/

openSUSE 11.0 RC2 - Please do final testing!

Filed under: Linux, SUSE — Tags: , , — sontek @ 9:25 pm

Coolo was nice enough to leak us the RC2 LiveCD’s for openSUSE 11.0 RC2, please download and do final testing to make sure we have the best openSUSE release. Get them here

Features to test can be found here and as always, check most annoying bugs.

May 6, 2008

Utah openSUSE User Group meeting tonight!

Filed under: Linux, SUSE — Tags: , , — sontek @ 9:18 am

Tonight we are having our first openSUSE User Group meeting, we’ll be discussing 11.0 Beta 2.

* Date/Time: Tuesday, May 6, 2008 @ 7:00pm.
* Location: Applebees, 105 E 12300 S, Draper, UT
* Google Maps: Click Here

You can get more information on the group here.

Powered by WordPress