Author Archive

Running a script after log off in Ubuntu

Perhaps bit of a hack I but could not find another way of unmounting Samba shares automatically before my user session ends. If I do not unmount them myself, they would stay mounted after network manager has shutdown making Ubuntu hang. So to overcome this problem, I’ve done the following:

$ cd /etc/gdm/PostSession
$ sudo vi Default

add your commands before “exit 0″, for example:

sudo fusermount -u /home/juraj/shareA/
sudo fusermount -u /home/juraj/shareB/
exit 0

Save (:wq) and give it a go - restart or logoff. Tested in Ubuntu 8.10

No Comments

Ubuntu - visual tuning

Ubuntu comes with Gnome and default settings include some visual effects (provided graphic card and drivers can handle them). To get the most out of it, consider installing the following (using Synaptec or “sudo apt-get install package-name“):

This manager includes endless compiz configuration options including burning of windows on closing, Mac-like window effects and much more.

Allows to customise Gnome colours - panels, desktop, icons etc. Try these 220 Gnome colour schemes

No Comments

Samba and deleting of files

I have been having problems with deleting of files from a network drive mapped via Samba (client machine being WinXP running in Virtualbox and server being Ubuntu 8.10). The files I was trying to delete were mapped using SSHFS (and shared via Samba).

It seems that Samba restricts deleting of files that are not owned by the same user, i.e. files were mapped using SSHFS as userA but userB was accessing them via Samba. The “-o allow_other” option in Samba helps to access other users’ files but deletion fails in most cases.

I have found several articles mentioning the same problem but no one had a solution. I then decided to look at the list of Samba options and searched for “delete”. The “trick” turned out to be “acl check permissions” option in Samba share config, e.g:

path = /home/user/dir
writeable = yes
browseable = yes
valid users = user
create mask = 644
directory mask = 755
acl check permissions = False

No Comments