You are not logged in.

#1 2012-05-18 17:06:09

Mykander
Member
Registered: 2012-03-30
Posts: 18

Permission problem

I'm trying to make a directory as a user but I'm denied and I can't figure out why.  Essentially I can create the directory if I go through the samba share, but not if I use mkdir at the command line and as far as I can tell I have all the rights to do so.  The only thing I can think of is the directory has write access for the users group, and is assigned to the users group, but the john account primary group is john and he's only attached to the users group as a a secondary.  However from my understanding of unix permissions, that shouldn't prevent john from creating a directory.

/etc/passwd:
john:x:1000:1000::/home/john:/bin/bash

/etc/group:
users:x:100:john

Samba share config
[audio]
   comment = Audio Share
   path = /media/audio/
   public = no
   writable = yes
   browsable = no
   valid users = john
   directory mask = 0775
   create mask = 0660
   force group = users
   printable = no

Directory permissions:
drwxr-xr-x 7 root root 4096 May 17 16:23 /media
drwxrwxr-x 4 root users 4096 May 14 16:27 /media/audio/

Offline

#2 2012-05-18 18:06:47

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Permission problem

You don't need to / should not create directories for drives mounted in /media (or anywhere outside your $HOME directory). This is supposed to be done automatically either via udev, or fstab. That's at least how I understand it and how I've been using it myself.

Last edited by bohoomil (2012-05-18 18:07:05)


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2012-05-18 18:07:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: Permission problem

You did not specify where you are trying to create the directory.  Given the above, john will not be able to write to /media.  I think he should be able to write to /media/audio/


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2012-05-18 18:34:06

Mykander
Member
Registered: 2012-03-30
Posts: 18

Re: Permission problem

ewaller wrote:

You did not specify where you are trying to create the directory.  Given the above, john will not be able to write to /media.  I think he should be able to write to /media/audio/


I'm trying to create the directory in /media/audio.

Offline

#5 2012-05-18 18:38:26

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Permission problem

What file system is the 'audio' device?


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#6 2012-05-18 18:44:15

Mykander
Member
Registered: 2012-03-30
Posts: 18

Re: Permission problem

bohoomil wrote:

What file system is the 'audio' device?

Just an ext4 file share on a raid.  I'm co-opting the /media directory as my file share directory since my directory structure was already setup for it via the last linux OS I was running.

Offline

Board footer

Powered by FluxBB