January 19, 201115 yr Hi, I was trying to copy files from unraid server #1 (Tower1) to #2 (Tower2). So far, smbmount works but some of the files copied over have hidden file attribute. Example, the folder.jpg for the VIDEO_TS is hidden and Windows Media Center will not see it. I am using these commands. How do I make the files visible? Started these from Tower2 console. mkdir /mnt/tower1/Movies smbmount //Tower1/Movies /mnt/tower1/Movies cp -rp /mnt/tower1/Movies/* /mnt/user/Data/Movies Using this rsync command produced the same hidden files. rsync -av --stats --progress /mnt/tower1/Movies /mnt/user/Data/ Thanks!
January 19, 201115 yr Samba preserves the extended attributes of files so your destination is exactly the same as your source. If you are looking for a way to remove the hidden attribute from within Linux you can use the chmod command to remove the 'world execute' bit and that will remove the hidden attribute when Windows sees the file. Here is an article that shows how Samba interchanges the Unix permissions with the Dos/Windows attributes. To remove the world execute or 'un-hide' a file named foo use chmod o-x foo To recursively 'un-hide' all the jpegs in a directory you could use chmod -R o-x *.jpg There are other ways to skin this cat, but that is the best one I came up with
January 19, 201115 yr Author Samba preserves the extended attributes of files so your destination is exactly the same as your source. If you are looking for a way to remove the hidden attribute from within Linux you can use the chmod command to remove the 'world execute' bit and that will remove the hidden attribute when Windows sees the file. Here is an article that shows how Samba interchanges the Unix permissions with the Dos/Windows attributes. To remove the world execute or 'un-hide' a file named foo use chmod o-x foo To recursively 'un-hide' all the jpegs in a directory you could use chmod -R o-x *.jpg Thanks Spectrum, The original files are not hidden. The copied files' attribute was modified part of the mounting and copying process. Any other help besides global chmod?
January 19, 201115 yr The original files are not hidden. The copied files' attribute was modified part of the mounting and copying process. Any other help besides global chmod? I just tried mounting a user share using smbmount and the perms are indeed DIFFERENT than the source. I mounted my music share in /mnt/test using mount -t cifs //localhost/Music /mnt/test and got the following results: root@Nesoi:~# ls -l /mnt/user/Music/Mu* -rwx------ 1 root root 828166 Dec 13 01:48 /mnt/user/Music/Music.md5* root@Nesoi:~# ls -l /mnt/test/Mu* -rwxr-xr-x 1 root root 828166 Dec 13 01:48 /mnt/test/Music.md5* So when that file is copied out it has the new permissions which would show the file as hidden when exposed through samba. The exact behavior you are seeing.... I dug around a little bit and can't find any info on controlling the behavior via the mount command. There may be a way, but I haven't found it yet. One solution would be to use nfs. Export the shares as nfs ( *(rw) ) then mount using mount -t nfs server:/mnt/user/Music /mnt/tmp that get's me root@Nesoi:~# ls -l /mnt/tmp/Mu* -rwx------ 1 root root 828166 Dec 13 01:48 /mnt/tmp/Music.md5* and copies with the correct permissions. Unless you can dig up a way to force samba to just export the unix permissions via the cifs driver, you may have to use nfs or set up rsync running in daemon mode.
January 19, 201115 yr Author The original files are not hidden. The copied files' attribute was modified part of the mounting and copying process. Any other help besides global chmod? I just tried mounting a user share using smbmount and the perms are indeed DIFFERENT than the source. I mounted my music share in /mnt/test using mount -t cifs //localhost/Music /mnt/test and got the following results: root@Nesoi:~# ls -l /mnt/user/Music/Mu* -rwx------ 1 root root 828166 Dec 13 01:48 /mnt/user/Music/Music.md5* root@Nesoi:~# ls -l /mnt/test/Mu* -rwxr-xr-x 1 root root 828166 Dec 13 01:48 /mnt/test/Music.md5* So when that file is copied out it has the new permissions which would show the file as hidden when exposed through samba. The exact behavior you are seeing.... I dug around a little bit and can't find any info on controlling the behavior via the mount command. There may be a way, but I haven't found it yet. One solution would be to use nfs. Export the shares as nfs ( *(rw) ) then mount using mount -t nfs server:/mnt/user/Music /mnt/tmp that get's me root@Nesoi:~# ls -l /mnt/tmp/Mu* -rwx------ 1 root root 828166 Dec 13 01:48 /mnt/tmp/Music.md5* and copies with the correct permissions. Unless you can dig up a way to force samba to just export the unix permissions via the cifs driver, you may have to use nfs or set up rsync running in daemon mode. Thanks for the time and effort Spectrum! I tried the following and not successful in mounting: root@Tower2:/# mount -t nfs 192.168.0.101:/mnt/user/Movies /mnt/tower1 mount.nfs: access denied by server while mounting 192.168.0.101:/mnt/user/Movies root@Tower2:/# mount -t nfs Tower1:/mnt/user/Movies /mnt/tower1 mount.nfs: access denied by server while mounting Tower1:/mnt/user/Movies Also, in WebGui of Tower1 and Tower2, under "Shares": User Shares=Enable Disk Shares (NFS)= *(rw) What else am I missing that prevented me from mounting using NFS?
January 19, 201115 yr Sounds like you shared out the disk shares in the Export settings section which will share out all your disk mounts i.e. /mnt/disk1 /mnt/disk2 etc. If you want to use NFS for a particular user share you need to set it on a per share basis in the user shares section. See attached pic.
January 19, 201115 yr Hi, I was trying to copy files from unraid server #1 (Tower1) to #2 (Tower2). So far, smbmount works but some of the files copied over have hidden file attribute. Example, the folder.jpg for the VIDEO_TS is hidden and Windows Media Center will not see it. I had similar problems with hidden file attributes...this script helped clear up my attributes, and eliminated the need to recheck at any time: http://lime-technology.com/forum/index.php?topic=4674.msg43603#msg43603
January 19, 201115 yr Author Thanks Spectrum! I now see the share export option. I always thought it was at the upper portion of the Share tab. So I will set "*(rw)" for the share I want to export. Also thanks mbryanr for the link. It is pretty long and will read it to follow the instructions. I will report back when I get a chance to try it out.
January 20, 201115 yr Author Update: "mount -t nfs server:/mnt/user/Movies /mnt/Temp" command works with setting User Shares to *(rw) Then using "rsync -av --stats --progress" copying all the files with the right file attribute and permission. No more hidden files using NTF. Case solved. Thanks Specturm and mbryanr!
Archived
This topic is now archived and is closed to further replies.