Wednesday, April 14, 2010

Getting CGI working

Add the following to the apache.conf - or sites-enabled conf file

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/


Options +ExecCGI
AddHandler cgi-script cgi pl



Make sure the permissions are right on the file - chmod a+x and the owner should be www-data.

Make sure that the path to the interpreter is correct i.e. with perl - /usr/bin/perl.

Useful information about CGI configuration.

Monday, April 12, 2010

Where is sftp connected drive mounted?

If you mount a drive using ssh in Ubuntu 9.10 via the Places > Connect to Server dialog, you see it as a shortcut in Nautilus. However it's not obvious 'where' it is actually mounted if you want to browse to it for any reason.

The command 'mount' shows you something like this: gvfs-fuse-daemon on /home/username/.gvfs type fuse.gvfs-fuse-daemon. The mount point is: /home/username/.gvfs

SAMBA Shares

Add the following to the bottom of the /etc/samba/smb.conf

[sharename]
comment = a comment
writable = yes or no
locking = no
path = /path/to/shared/folder
public = yes or no
valid users = username

Uncomment the line in the smb.conf:
security = user

You need to add an existing user to the sambashare group:
sudo usermod -g sambashare username

Create a samba password for the user - the -a is only needed the first time you set up a password for a new samba user:
sudo smbpasswd -a username

Restart SAMBA:
sudo smbd -D
sudo nmbd -D