home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Directory Access

----- Original Message -----
> On Fri, Nov 22, 2013 at 1:04 AM, Paul < contact [ dot ] paul [ at ] ncf [ dot ] ca > wrote:
> With regards to the screen dump listed under CODE: below,
> would someone be so kind as to share with me why I am unable to
> access the Recipes.0 directory?
> ...
> drw-rw---- 4 librarian librarian 4096 Nov 22 00:39 Recipes.0
> ...
> From: "Timothy Brier" <briert [ at ] cepu [ dot ] ca>
> ...
> You need execute permission on a directory to be able to access it.  
> Recipes.0 and Recipes.1 doesn't have the execute set and that's why
> you can't access it without doing an su.
> ...
> Hope that helps.
> - Tim.

Yes, it does.

After reading this, then reading TFM, I've:
 1) come to full appreciation of the differences between file and directory permissions; and
 2) cleaned up how I mount smb directories.

A part of the reason for my own confusion:

I was using cifs-utils to mount smb shares. I had my dir_mode set to 0660 and file_mode set to 0660, and noperm set, and with this I had no issues traversing those directories, even though they had permissions set to 660. No kidding, it actually works that way. So as far as I was concerned, you didn't need the x bit set to traverse a directory.  It was working fine without it, and I didn't want execute priviledges running off those shares anyways. That was my thinking, anyways.


Well, horrible configurations work well until the real world comes knocking.

The Recipe.n directories were made using a script that just copied and applied the directory permissions from their source, which in this case was the mounted smb drive, but because these new directories weren't being accessed through cifs-utils with permissions turned off (which is to say that they were behaving the way they should), I couldn't get into them.

Did I say permissions turned off?
Well, not any more.  noperm is no longer part of my mount options list.

I can't express how relieved I am that I've fixed all of that.



message navigation