LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-09-2006, 08:40 AM   #1
prismbiz
LQ Newbie
 
Registered: Sep 2003
Location: North Carolina
Distribution: Red Hat & Fedora
Posts: 12

Rep: Reputation: 0
Post Permission problems on mounted WinXP share


All as root...

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.
 
Old 07-09-2006, 07:05 PM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
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.
 
Old 07-09-2006, 09:44 PM   #3
prismbiz
LQ Newbie
 
Registered: Sep 2003
Location: North Carolina
Distribution: Red Hat & Fedora
Posts: 12

Original Poster
Rep: Reputation: 0
Post

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.
 
Old 07-10-2006, 03:10 AM   #4
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by prismbiz
All as root...

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.
 
Old 07-10-2006, 05:53 AM   #5
prismbiz
LQ Newbie
 
Registered: Sep 2003
Location: North Carolina
Distribution: Red Hat & Fedora
Posts: 12

Original Poster
Rep: Reputation: 0
Post

I removed the uid=, and gid= from the mount command and replaced it with 'noperm'. Same results.

What I don't understand is why I CAN copy some files, but a few, select other won't work.
 
Old 09-28-2006, 04:59 PM   #6
jas4048
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
Cif

Has anyone figured this one out yet?
 
Old 10-18-2006, 02:12 PM   #7
pinguboy
LQ Newbie
 
Registered: Oct 2006
Posts: 1

Rep: Reputation: 0
I have the same problem, when I try to copy some files on a Win-XP Share to my linux home directory

(logged in as root and entered: "cp IMG_1036.JPG /home/user1/")

cp: cannot open `IMG_1036.JPG' for reading: Permission denied

ls -ahl is:
...
-rwxr-xr-x 1 root root 4.8M Aug 15 08:15 IMG_1035.JPG
-rwxr-xr-x 1 root root 3.9M Sep 30 11:59 IMG_1036.JPG
-rwxr-xr-x 1 root root 4.4M Sep 30 12:00 IMG_1037.JPG
-rwxr-xr-x 1 root root 4.4M Sep 30 12:23 IMG_1038.JPG
...

The other files I can copy without any problem.

Who can help ?
 
Old 11-01-2006, 06:55 PM   #8
Refoyl
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
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.
 
Old 12-27-2006, 02:31 PM   #9
mossc
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
similar problem

I had a similar problem.

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.
 
Old 05-19-2007, 04:51 AM   #10
jano32
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
i have the same problem :
 
Old 10-09-2007, 09:54 PM   #11
JungK
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by jano32 View Post
i have the same problem :
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.

Last edited by JungK; 10-09-2007 at 10:30 PM.
 
  


Reply

Tags
jpeg, mount, permissions, rotate



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is fmask & dmask required to write to a WinXP share mounted on Mdrake SMB client ruscook_oz Linux - Networking 1 02-08-2007 05:50 PM
Can't get RW permission on a mounted samba share darkangel12613 Linux - Software 6 08-31-2006 07:04 AM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 08:23 AM
permission problems with mounted smb shares mackayr Linux - Networking 3 12-29-2004 11:48 PM
mounted but no write permission varunk123456 Red Hat 1 03-31-2004 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration