Could not create directory when creating backups stored on mounted NFS
Symptoms
When creating a backup the following will appear in the command line:
./fisheyectl.sh backup -f /backup/fisheye/backup_2014-25-06_1043.zip -c 9 --no-sql --cache
INFO - Using log4j configuration file: /opt/atlassian/fisheye/log4j-client.xml
INFO - FishEye arguments: [-f, /backup/fisheye/backup_2014-25-06_1043.zip, -c, 9, --no-sql, --cache]
Could not create directory: /backup/fisheye
Backup failed
Could not create directory: /backup/fisheye
The following appears in the atlassian-fisheye-YYYY-MM-DD.log
:
2014-06-25 16:34:30,747 WARN [Thread-19833 ] fisheye ShutdownService-handleClient - Problem with command: backup.
java.io.IOException: Could not create directory: /backup/fisheye
at com.cenqua.fisheye.io.IOHelper.mkdirs(IOHelper.java:233)
at com.atlassian.crucible.migration.BackupManagerImpl.createBackup(BackupManagerImpl.java:228)
at com.atlassian.crucible.migration.BackupManagerImpl.access$000(BackupManagerImpl.java:55)
at com.atlassian.crucible.migration.BackupManagerImpl$1.perform(BackupManagerImpl.java:129)
at com.atlassian.crucible.migration.BackupManagerImpl$1.perform(BackupManagerImpl.java:127)
at com.atlassian.crucible.maintenance.MaintenanceManager.doMaintenance(MaintenanceManager.java:108)
at com.atlassian.crucible.migration.BackupManagerImpl.createBackupAtLocation(BackupManagerImpl.java:127)
at com.cenqua.fisheye.ctl.ShutdownService.backup(ShutdownService.java:238)
at com.cenqua.fisheye.ctl.ShutdownService.handleClient(ShutdownService.java:142)
at com.cenqua.fisheye.ctl.ShutdownService.access$200(ShutdownService.java:37)
at com.cenqua.fisheye.ctl.ShutdownService$3.run(ShutdownService.java:87)
at java.lang.Thread.run(Thread.java:744)
Cause
This is caused by a permission error that prevents the user running the backup command from writing and creating directories in the specified directory.
Resolution
Verify that the user running the command has permission to write and create directories in the path provided.
touch /backup/fecru/write_file mkdir /backup/fecru/new_dir
Verify that the
fstab
configuration includes thesuid
option which permits the operation ofsuid
andsgid
bits.<SERVER>:/volumes/pool-misc/Backups /backup nfs auto,rw,suid,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0