Sunday 30 March 2014

Drupal Backup and Migrate private folder settings

So, I'm just getting started with Drupal and just installed the Backup and Migrate module. When I tried a backup to a folder on the same server it came up with an error. It was basically saying that this folder was not private and anyone can access it.

Thought I'd take a quick look into it. Turns out that the folder in question - sites/default/files/private/backup_migrate/manual/
can be read by anyone, therefore files are not safe.

So, how do you make it 'private'. Well, a good test is to try and navigate to the file:
sites/default/files/private/backup_migrate/manual/test.txt
which automatically gets made. I typed it into a browser and it loaded up. Simple.

So, to limit access depends on you hosting provider. I'm with Daily.co.uk, and they suggest using .htaccess files. I found this nice article on the subject, worth reading through properly.

I found that this command at the top of the .htaccess file (which was already in the folder) solved the problem:

AllowOverride All

I figure it's telling the Apache server to override all options.

Thursday 27 March 2014

Mac OS X clients getting wrong DNS names

Hi, so we've had macs here for a long time. We eventually got them working with the Active Directory, and with this I thought would also come the DNS or DDNS names i.e. mymac.instituation.ac.uk (for local network stuff). I must iterate here that this is just for internal name lookups, nothing external here, no internet related stuff, intranet ONLY.

So, it worked on most of them. After adding them to active directory, they got their names: 'mymac1.institution.ac.uk', but for about 1 in 5 macs (we have about 150) it'll give it the DNS name of some random machine in college! So instead of it saying 'mymac.institution.ac.uk' it'll say 'somonesPC.institution.ac.uk' !!!!!

I've put up with it for about 7 years, just used the mac sharing name instead, and remembering IP addresses. But we're trying to integrate the macs further into the network, and this is perhaps one of the last hurdles.

Anyway, I did some searching and found this quite frustrating forum. Seems lots of people not communicating very well. At the end, someone suggested this solution. I've yet to try it but if anyone has any comments?


So, I've now found a command which changes: Computer Name, Host Name, Local Host Name:
scutil --get ComputerName
scutil --get HostName
scutil --get LocalHostName

The Computer Name and Local Host Name is the one set up through System Preferences > Sharing, at the top


scutil --get ComputerName|scutil --set HostName

Monday 10 March 2014

OS X Mavericks and Active Directory Home drive problems (NHR)

So, I'm going to document what problems I currently have with Active Directory home drives stored on windows SMB shares.

In the past when we put our macs on the active directory logins, I always untick the "Force local home" in the active directory options. The main reason is so that users take with them all of their account settings and preferences where-ever they login. This does however come with problems. It seems the mounted home drive has some permission issues which some applications have real problems with.

In the past I have installed Network Home Redirection (NHR). At login, this script runs whenever it detects the user to be a network user. It then creates a local temporary folder and creates alias' from particular folders on your home drive to the local folder. From the perspective of an application running, it thinks that these folders are normal local folders which they tend to prefer.

The default NHR setup redirects folders of known problems in OS X 10.6. But I don't think it is updated anymore. I have been constantly adding and taking away folder re-directions for the application we use in the computer suites.

Here I shall document current problems with network home preferences where NHR has worked.

Adobe Acrobat Pro 9
Seems to Crash when opening a document
Redirected folder: ~/Library/Application\ Support/Adobe/Acrobat
Seems to have fixed the crash