We have a web server running on Centos 6.3 and we intend to mount a shared Windows drive (Windows 2008) so that we can do our daily backups on to the shared drive. This is how I am mounting the drive at the moment.

mount.cifs  //172.27.0.190/Moodle$ /srv/www/moodledata \
  -o username=LHU/moodledata,password=<password> \
  -o rw,dir_mode=0777,file_mode=0777,uid=root,gid=root

This allows me to mount the drive and I am able to create new directories and files. However I am unable to delete anything, move or replace any files or folders. This is problematic since we use a script to automatically backup our database and we have a weekly rotation schedule which at the moment cannot delete files, so the shared drive is filling up with database copies since the script cannot delete obsolete copies. Further more, we rsync the data from a folder on the server to a folder on the shared drive. This doesn't work either.

E.g.

rm: cannot remove `weekly/mysql/weekly_mysql_2012-10-26_13h15m_43.sql.gz': Permission denied

The user info is correct and has full control on the folder in Windows 2008.

I would be very grateful for any advice to fix this issue.

  • Try deleting using smbclient. My bet is that the problem is on the Windows server side. – Stéphane Chazelas Aug 9 '13 at 11:43
  • @StephaneChazelas My login strangely failed when using smbclient. smbclient //172.27.0.190/Moodle$ -U =LHU/moodledata -P=<password>. I have checked multiple times to ensure the password is correct. Using the same details with mount works – Alex Aug 9 '13 at 12:10
  • smbclient //172.27.0.190/Moodle$ -U LHU/moodledata -P M0od1E01 WARNING: The "idmap uid" option is deprecated WARNING: The "idmap gid" option is deprecated session setup failed: NT_STATUS_LOGON_FAILURE – Alex Aug 9 '13 at 12:52

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.