Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I mount a WinXP share from FC4 using the following:
mount -t cifs -o ro,credentials=/root/credentials.txt,workgroup=workgroup,uid=michael,gid=michael //192.168.5.105/laptopmydocs /mnt/backup
That works fine. I can list the contents of /mnt/backup.
When I try and rsync /mnt/backup to the FC4 box, I get the following error on selected (not all) files:
rsync: send_files failed to open "/mnt/backup/My Pictures/2006_04_14/IMG_0369.JPG": Permission denied (13)
If I try and cp the file, I get:
cp: cannot open `/mnt/backup/My Pictures/2006_03_02/IMG_0346.JPG' for reading: Permission denied
When I check permissions I get:
-rwxrwSrwt 1 michael michael 832533 Mar 19 20:39 /mnt/backup/My Pictures/2006_03_02/IMG_0346.JPG
This happens on 10-15 files and appears to be limited to files with extensions .jpg, .mdb, or .psa. All else works fine, and some files with these extensions work fine.
This is a hassle because of the intent of using rsync was to create an off-site backup, and now I'm not getting all the files that need to be backed up.
Something vaguely like this happened to me a while ago, when copying files off a USB stick that I'd loaded up in Windows. I think it had something to do with files belonging to "special" Windows folders such as "My Pictures". If I remember rightly, applying an fmask to the mount solved the problem. You can do this in CIFS by using the options dir_mode and file_mode. It's not an ideal solution but it should work.
FWIW, I changed the mount to use file_mode=0550 and dir_mode=0550 - and got the same problem, that is, permission problems on .jpg files in My Pictures folder on WinXP box.
I mount a WinXP share from FC4 using the following:
mount -t cifs -o ro,credentials=/root/credentials.txt,workgroup=workgroup,uid=michael,gid=michael //192.168.5.105/laptopmydocs /mnt/backup
That works fine. I can list the contents of /mnt/backup.
When I try and rsync /mnt/backup to the FC4 box, I get the following error on selected (not all) files:
rsync: send_files failed to open "/mnt/backup/My Pictures/2006_04_14/IMG_0369.JPG": Permission denied (13)
If I try and cp the file, I get:
cp: cannot open `/mnt/backup/My Pictures/2006_03_02/IMG_0346.JPG' for reading: Permission denied
When I check permissions I get:
-rwxrwSrwt 1 michael michael 832533 Mar 19 20:39 /mnt/backup/My Pictures/2006_03_02/IMG_0346.JPG
This happens on 10-15 files and appears to be limited to files with extensions .jpg, .mdb, or .psa. All else works fine, and some files with these extensions work fine.
This is a hassle because of the intent of using rsync was to create an off-site backup, and now I'm not getting all the files that need to be backed up.
Thanks for the help.
cifs supports Unix permissions, so it tries to interpret remote permissions as Unix permissions for local users, and the user and group you give it are ignored. Try giving the "noperm" option.
I have the same problem. It only occurs with JPG files that are automatically rotated to portrait mode by the Canon CameraWindow program. Renaming the files (under XP) does not help, but copying them to a new name and then renaming them back to the original name removes the problem. There is no visible evidence of strange protection bits under XP, at least none I can see with the ATTRIB program.
A share mounted successfully but I could not even run ls against the mount point.
I got permission denied.
Checking the XP system I found that the directory was restricted to readonly but the share permissions were to "allow network users to change my files".
After removing this permission from the share so it was read only from XP I was able to read the whole tree on my linux box.
I think XP has issues when the file is readonly but the share is read write.
Maybe it is the same for files.
The problem is you do not have write permission to NTFS files/folders.
These NTFS permissions are set easily if you use a Windows Server.
On WinXP pro/home use the same NTFS permission as on Window Server.
To set these permissions on WinXP home, first you have to uncheck Simple File Sharing (in Folder Options in Control Panel or menu Tools/Folder Options when you browse in Windows Explorer, select View tab and in Advanced Settings list, you can see it if you scroll to the end).
After that, you can right click on folder which you like to change permission, select Properties and Security tab. Click or Add user who have permission to change your file, then check on prefer permissions.
If you use WinXP Home, you can start Windows in safe mode (use F8 key - then select Safe Mode) logon as Administrator.
Remember this Security tab appears only on NTFS volume.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.