3

I have two directories:

c:\work\directory1

and

c:\work\directory2

which are mounted under:

/mnt/c-drive/

When I try to read any file under directory1 I can, but when I try to read any file in directory2 I receive a "Permission Denied" error.

/mnt/c-drive/directory1
drwxrwxrwx 1 root root     0 2008-10-17 11:13 directory1
/mnt/c-drive/directory1/file1
-rwxrwSrwx 1 root root 257 2008-10-17 11:13 file1


/mnt/c-drive/directory2
drwxrwxrwx 1 root root     0 2009-07-20 10:42 directory2
/mnt/c-drive/directory2/file1
-rwxrwSrwx 1 root root   844 2009-07-20 10:42 file1

The Windows machine is running Windows XP Media Center Edition. The Linux is Fedora 10.

When I right click on either of the two files or their parent directories their attributes appear identical. On files: Read Only -, Hidden -, file is ready for archiving +, for fast search +, compress -, encrypt - On directories: Read Only +, Hidden -, file is ready for archiving -, for fast search +, compress -, encrypt -

If there's any other info I can give to help, let me know.

Any help would be appreciated, thanks.

Additional info: Mounted via: mount -t cifs //192.168.1.103/c /mnt/c-drive with no username/password

CALCS Output:

Directory 1:

C:\work\directory1 BUILTIN\Users:F
BUILTIN\Users:(OI)(CI)(IO)F
Everyone:F
Everyone:(OI)(CI)(IO)(special access:)

                STANDARD_RIGHTS_ALL

                DELETE

                READ_CONTROL

                WRITE_DAC

                WRITE_OWNER

                SYNCHRONIZE

                STANDARD_RIGHTS_REQUIRED

                GENERIC_READ

                GENERIC_WRITE

                GENERIC_ALL

                FILE_GENERIC_READ

                FILE_GENERIC_WRITE

                FILE_GENERIC_EXECUTE

                FILE_READ_DATA

                FILE_WRITE_DATA

                FILE_APPEND_DATA

                FILE_READ_EA

                FILE_WRITE_EA

                FILE_EXECUTE

                FILE_DELETE_CHILD

                FILE_READ_ATTRIBUTES

                FILE_WRITE_ATTRIBUTES

BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
E510\Rob:F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:(OI)(CI)(IO)(special access:)

                     GENERIC_READ

                     GENERIC_EXECUTE

BUILTIN\Users:(CI)(IO)(special access:)

                 FILE_APPEND_DATA

BUILTIN\Users:(CI)(IO)(special access:)

                 FILE_WRITE_DATA

Directory 2:

        C:\work\direcory2 BUILTIN\Users:F
        BUILTIN\Users: (OI)(CI)(IO)F
        Everyone:F
        Everyone:(OI)(CI)(IO)(special access:)

               STANDARD_RIGHTS_ALL

               DELETE

               READ_CONTROL

               WRITE_DAC

               WRITE_OWNER

               SYNCHRONIZE

               STANDARD_RIGHTS_REQUIRED

               GENERIC_READ

               GENERIC_WRITE

               GENERIC_ALL

               FILE_GENERIC_READ

               FILE_GENERIC_WRITE

               FILE_GENERIC_EXECUTE

               FILE_READ_DATA

               FILE_WRITE_DATA

               FILE_APPEND_DATA

               FILE_READ_EA

               FILE_WRITE_EA

               FILE_EXECUTE

               FILE_DELETE_CHILD

               FILE_READ_ATTRIBUTES

               FILE_WRITE_ATTRIBUTES

        BUILTIN\Administrators:F
        BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
E510\Rob:F
CREATOR OWNER:
        (OI)(CI)(IO)F
BUILTIN\Users:    (OI)(CI)(IO)(special access:)

                    GENERIC_READ

                    GENERIC_EXECUTE

BUILTIN\Users:    (CI)(IO)(special access:)

                FILE_APPEND_DATA

BUILTIN\Users:    (CI)(IO)(special access:)

                FILE_WRITE_DATA

Here are CACLS info for 2 individual files directory1\file1

BUILTIN\Users:F
Everyone:F
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
E510\Rob:F

directory2\file1

E510\Rob:F
NT AUTHORITY\SYSTEM:F
BUILTIN\Administrators:F

So now that I see the premission differences.

2 Answers 2

4

It sounds to me like you should go look at the NTFS permissions on those directories on the Windows XP computer. My guess is that the user account you're using to mount those from the Fedora box doesn't have rights.

Since it's XP Media Center the "Security" tab of the folder properties might be hidden. From a command-prompt, you can use the CACLS command (as below) to list the permissions:

CACLS C:\Directory1

The output of CACLS is somewhat easy to parse, but you can post the output here as an edit to your question if you're having trouble with it.

What Windows username are you specifying in the arguments to your mount on Linux?

Edit:

Okay-- so w/o a username and password specified you're connecting as "guest". The permission "Everyone:F" is allowing that to work.

The NTFS permissions on those directories are the same. If you create a new file in each directory from either the Windows or Linux machine you should see the same access. Try that and make sure it works.

I'm wondering if you have permissions set on individual files in "directory2". Since XP Media Center "hides" the "Security" tab by default (if I remember properly), try a CACLS referencing an individual file that's giving you problems in "directory2". I suspect you'll find that it has different permissions than "directory2" itself. Did you happen to move files into "directory2" from elsewhere on the hard disk drive of the computer?

4
  • Posted the CACLS info, thanks for taking a look at this. I'm currently using no windows username/pwto mount the drive, and up until this point I've never run into access denied problems.
    – Rob
    Jul 20, 2009 at 15:54
  • I dropped an edit on here. Let me know what you think re: that. I've got to step out for a bit, but I'll be back on in a couple hours. (Okay, everybody, go to it-- rep's all yours!) Jul 20, 2009 at 16:16
  • Creating a new file in dorectory2 worked fine ( I had access to it.) After checking the individual file CACLS premissions, I created a work3 directory, copied all the files over to it, and I suddenly had access to all of them. The files were created by a 3rd party program I installed. Thanks for all the help! :)
    – Rob
    Jul 20, 2009 at 16:41
  • Sounds like your 3rd party program was putting ACLs on the files, then. I was going to suggest copying the files to see what happened to the ACLs, but you beat me to it. Jul 20, 2009 at 18:45
1

This is the most frequently referred to website for this problem. Just had this enlightenment on a new setup of Windows 7 on my desktop. A week of frustration led me to use this command on my Linux system

sudo mount -v -t cifs -o user=username,vers=2.1 '//h18/Public/' /media/h18

h18 can be the URL as 192.168.0.4 /media/h18 is the directory on the Linux/Unix system Using the Users/Public directory to save defining sharing rights on the W7 System. This worked fine ONLY AFTER I had set the network access permissions on the Windows 7 system as follows:

  1. Click Start and enter Explorer
  2. In the window will be Windows Explorer. Right Click and Open program as Administrator.
  3. Right Click on Network in Windows Explorer.
  4. Choose Change advanced sharing settings and ensure that the following are selected Turn on network discovery Turn on file and printer sharing Turn on sharing so anyone with network access...... Enable file sharing for devices that use 40........ (enables my Rasberry Pies) Turn on password protected sharing AND Save Changes!!! There may be some overkill in there but for a home-computer-lab they are all pretty safe as they apply to the LAN. Hope this helps someone. Keep safe, Ianm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .