Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I 2 received diagnostic logs from a user. Both of them are compressed as bz2 files and stored on a samba share. I unzip each, and then rename the folder. 1 of the folders I am able to rename, yet the other I can not. I am running as root on OsX, and both folders have the same permissions.

See below (file names sanitized)

bob# ls -ial
14632222195 -rw-r--r--   1 bob  staff  215024109 Jun 12 10:50 foo_A.tar.bz2
12269908036 -rw-r--r--   1 bob  staff    2069144 Jun 12 10:50 foo_B.tar.bz2

sudo su -

root# tar -zxvf foo_A.tar.bz2
root# tar -zxvf foo_B.tar.bz2

root# ls -ial
12526484990 drwxr-xr-x   3 bob  staff      16384 Jun 12 11:38 foo_A
14558086210 drwxr-xr-x   3 bob  staff      16384 Jun 12 11:05 foo_B
14632222195 -rw-r--r--   1 bob  staff  215024109 Jun 12 10:50 foo_A.tar.bz2
12269908036 -rw-r--r--   1 bob  staff    2069144 Jun 12 10:50 foo_B.tar.bz2

root# mv foo_A bar_A
root# mv foo_B bar_B
mv: rename foo_B to bar_B: Permission denied

I have tried changing the permissions for foo_B

sudo chdmod 777 foo_B  
12526484990 drwxrwxrwx   3 bob  staff      16384 Jun 12 11:38 foo_B

I've also tried recursively changing all files in the foo_B directory

sudo chdmod -R 777 foo_B  
12526484990 drwxrwxrwx   3 bob  staff      16384 Jun 12 11:38 foo_B

I still get permission denied when trying to rename foo_B

What could possibly be causing this?

Update

Verified that md5sum is correct of tar ball
sudo mv foo_B bar_B still gives error: permission denied

Update 2

Looks like deleting the file and recreating it solved the problem. Must have been a bad extract.

share|improve this question
    
Is the file open on the samba side? –  Nathan C Jun 12 '13 at 18:18
    
I didn't think to check if the file is in use. I verified that all programs which could possibly be using it are closed –  spuder Jun 12 '13 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.