search

IP camera record to GoFlex Home

IP cameras generally offer an option to record or save to an FTP or NAS location and the GoFlex Home is great for this job  as it has FTP and SMB servers.

The problem is that Seagate chose to set up long folder names with spaces in them e.g. GoFlex Home Public and other devices often have trouble with that.

There are several options for fixing this problem;


  • For FTP the easiest solution is to create a symbolic link (like a Windows shortcut).
  • For SMB (Windows file sharing) you can create a new share.
  • Or you can change the Seagate branded file locations to something more manageable.
    This actually creates new directory/folder names on the hard drive and will break any existing mappings, SMB share names and backup paths so might not be the best option for you.
I will show you how to do each of the options. I don't actually have an IP camera myself so I'll reference the Dahua IPC-C35 that another GoFlex Home user asked about.

All of the following actions require you to first connect with SSH and become root user 

1. FTP - create a symbolic link

After becoming root user enter the command; 
                ln -s GoFlex\ Home\ Public dahua
Be sure to include the \ characters before the spaces in the folder name.

This will create the virtual folder (or shortcut) dahua linked to the GoFlex Home Public directory in the user folder of the user that you connected with SSH
The link won't be visible to other users and you may want to create a new user just for the IPcamera. In that case you either need to log in with SSH as that user or navigate to that user's home folder with the cd command before creating the link.

Dahua FTP settings for user ipcamera

Modify the command if you want to link to a different location, for example 
ln -s GoFlex\ Home\ Personal/webcam dahua
If you have created a subfolder named webcam in the user's personal folder.

Update: also see my post FTPS stopped working if you are still having trouble with FTPS

2. SMB - create a new anonymous share


Note: Apparently the Dahua Record to NAS feature uses  NFS rather than SMB (they refer to CIFS which is a deprecated version of SMB) https://dahuawiki.com/NASRecord .I will leave these instruction here however in case other manufacturer's cameras use SMB or in case the need for an anonymous share comes up for some other purpose.

Many camera interfaces, like the Dahua do not have  anywhere to enter username and password when connecting to a NAS by SMB, so we need to set up an anonymous share.
That means that everyone on your local network will be able to access the files in that location without a password.

You probably won't want to do that for the Public folder, so what I did was first add a new user ipcamera and created a network share linked to that user's Personal folder.

Use vi text editor to edit the samba configuration file with the command
          vi /etc/samba/smb.conf

Type i to enter input mode in vi and use the cursor(arrow) keys to move to the [global] section and change the line
map to guest = never            to        map to guest = bad user

This means that now when someone enters the wrong username or password they will be given guest access. Don't worry though because all the existing shares have a line guest ok = no

Next, move to the end of the file and enter the following

[Camera]
comment = ipcamera GoFlex Home Personal folder
path=/home/ipcamera/GoFlex Home Personal
browseable = yes
writable = yes
create mode = 0664
directory mode = 0775
force create mode = 0664
force directory mode = 0775
force security mode = 0775
force directory security mode = 0775
force group = www
force user = nobody
guest ok = yes

You can change [Camera] to any other share name you prefer.

Press 'Esc' to exit input mode and type ZZ (note capitals) to save and exit smb.conf editing.

Restart the smb server by entering the command /etc/init.d/smb restart and wait for restart.

The folder Camera (or whatever you called it) should now be visible in Windows file sharing.
The connection will depend on the client software. You can't actually connect with blank username and password so many clients will send generic text like username = anonymous, password = anonymous. This works fine because the map to guest = bad user line gives guest access to any user with incorrect credentials.

Access to the other shares will still prompt for a username and password.

For example , Windows file explorer asks me for network credentials for the Public folder

But goes straight to the Camera folder without asking.

File Manager HD on my Android tablet allows anonymous connection to the Camera share



but some client apps will still require you to enter a username and password even though you can enter almost anything and it will connect.

So whether this will work with your particular camera software or not is out of my hands. Good luck!
Dahua NAS settings


3. SMB - change Seagate branded file locations

The names of the file locations used by the Seagate GoFlex Home are stored in the /etc/branding.conf file and as this is just a text file it can be modified with vi text editor.

Use vi text editor to edit the branding.conf file with the command
vi /etc/branding.conf
Edit the lines highlighted below to shorter names with no spaces as shown (type i first to enter insert mode)

Edit branding.conf
If you use a different locale (language) you will need to edit the relevant locale branding.conf file. For example if you have set the locale to the Danish language on your GoFlex Home then edit the branding.conf.da-DK file

Press 'Esc' to exit input mode and type ZZ (note capitals) to save and exit branding.conf editing.

Reboot the GoFlex Home for the changes to take effect. You can do it manually or with the command /sbin/reboot

Note that changing the directory/folder names will break any paths to the old names and you will need to edit the smb.conf file (as shown in step 2. above) to update the paths to the new locations. Any existing network mappings on PCs will need to be updated as well as any paths set for backups. 

I really don't know that it is worth the trouble, but now you know how to do it please don't complain to me if your backups or any other existing connections you have set up stop working. 

After making the changes the new folder names display and you can add subfolders if you want
The changes take effect immediately for FTP paths, but like I said you will need to edit the smb.conf file for the new paths for Windows filesharing to work again. 
AndFTP from Android phone
And if you created any symbolic links using the command in step 1, the new path probably means that links are now broken so you will need to delete and recreate them with the new path.