Issue with file attributes


Recommended Posts

A drive on my 1st unRAID box has started acting flakey, so I decided to replace it.  Of course, 300GB isn't always 300GB, so I couldn't just replace the drive.  Because the 1st unRAID is maxed out, I put the new drive into my 2nd unRAID. 

 

From unRAID #2, I did an smbmount to mount the flakey disk on  unRAID #1

   

smbmount //tower/disk6/ /var/tmp

 

And then copied the data:

   

cp -r /var/tmp/* /mnt/disk4/

 

A little under 24 hours later, the flakey drive is still up and all the data is copied; however, all the copied files are now hidden system files.  Is there any way to easily make them non-system, non-hidden (hopefully a recursive command line command)?  Actually, is there even a way to change this manually?  I'll try recopying if it's something that I messed up on my commands.

 

Link to comment

Try this:

 

  chmod  -R  0700  /var/tmp/*

 

(The leading 0 in '0700' is important.)

 

What you're seeing is a result of how Samba implements the Windows 'Hidden' and 'System' file attributes.  It does this by overloading the 'group' and 'other' 'x' permission bits.  Those bits are getting set in your cp command and via Samba make the files appear to be hidden system files  ::)

 

Gory details can be read here:

http://www.oreilly.com/catalog/samba/chapter/book/ch05_03.html

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.