You are not logged in.

#1 2004-08-26 22:26:06

yak8998
Member
Registered: 2004-03-01
Posts: 143

permissions problem

I have a network drive (/mp3s) that mounts by running a root (alias) command when fluxbox starts (using the line in ~/.fluxbox/init) and also does a
Code:
chmod -R 777 /mp3s

so that XMMS can play everything.
But after I leave the computer sitting for a few hours w/o use, the permissions are magically set back to the default, where no one except root can touch the files. Whats the deal?

PS i have one other problem
With a lot of GTK apps I get the 'cannot open display 0:0' error message, yet with other apps it works fine - any easy solution for that?


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#2 2004-08-27 15:16:38

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: permissions problem

Regarding the permission problem; what are the permissions on the filesystem where the mp3 mount comes from? And what do you use to mount; NFS or Samba? The 'chmod -R 777 /mp3' is a really ugly solution which you should try to avoid using proper owners and permissions smile

Offline

#3 2004-08-27 16:22:37

yak8998
Member
Registered: 2004-03-01
Posts: 143

Re: permissions problem

its off a NTFS partition, thus it uses samba. Its a local drive if that makes any difference....? I'm not too familiar with samba, it took me 20 mins to set this up, and it works, so I was happy with it.


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#4 2004-09-07 22:52:30

yak8998
Member
Registered: 2004-03-01
Posts: 143

Re: permissions problem

ugh

ugly solution indeed.
I now can't chmod at all. I can manipulate the files as root, but my little chmod boogy returns a 'Read-only File System'

whats the right way to do this with fstab?

thx


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#5 2004-09-09 15:42:57

mercy
Member
Registered: 2004-04-24
Posts: 62

Re: permissions problem

uhm.. so its a local installed HD foratted as NTFS?

if yes you dont need SAMBA to accsess it locally at all..
put in your fstab (/etc/fstab):

<drive> <mountpoint> ntfs defaults,umask=000 0 1

e.g. if your drive with the mp3's is the 2nd hardisk containing just 1 partition:

/dev/discs/disc1/part1 /mnt/mp3 ntfs defaults,umask=000 0 1

than your non-root-users should be able to use it as well

to share it within a LAN use SAMBA if your other PC's run windoZe or NFS if linux


good luck

Offline

#6 2004-09-09 17:48:38

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: permissions problem

actually, i have an even better fstab line perfect for this, which i've been using for quite some time...

[drive] /mnt/mp3 ntfs    auto,gid=users,fmask=117,dmask=007  0 0

let me explain the options line for you

- automatically mount the partition on bootup
- set the group owner to users. (you can also say uid=steve to make all files belong to the user steve)
- if you're not familiar with the umask tool, masks are the opposite of your permissions. thus;
- fmask=117 means all files have 660 permissions. you don't want your mp3s to be executable.
- dmask=007 means directories have 770 permissions. you want your directories to be executable so you can cd into them.

Offline

#7 2004-09-09 18:34:40

mercy
Member
Registered: 2004-04-24
Posts: 62

Re: permissions problem

but does this give you also the right to "change" files/directories in the mounted partition as user/root?

Offline

#8 2004-09-10 01:04:31

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: permissions problem

yes. 660 means the owner and group owner can read and edit files, but others cannot. we set the gid to "users", meaning everyone in the "users" group (you should only include human users here) applies to the second digit of the permission. it also means that the file cannot be run as a program... since mp3s are not executable, it is not proper to set the executable flag.

root can always read and write, regardless of permissions. try chmod'ing a file to 000. root will still be able to edit the file.

google for a site explaining unix permissions, it will be quite helpful.

Offline

#9 2004-09-10 03:08:55

yak8998
Member
Registered: 2004-03-01
Posts: 143

Re: permissions problem

thank you paranoos (and everyone else who finally responded  big_smile )
I'm trying the line right now, I'll see how it works


Anyone have an idea of what the problem was with chmod though?


"Ignorance is bliss, for stupid people."
"open-source is [...] programming Darwinism."
Vaughan-Nichols

Offline

#10 2006-04-14 18:51:35

Galdona
Member
Registered: 2006-03-15
Posts: 196

Re: permissions problem

i am trying to do that:

/dev/hda6 /mnt/hda6 ext3 noatime,gid=users,fmask=117,dmask=007 0 1

but i get an error:

#mount /dev/hda6
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

when i do a dmesg, this:

# dmesg | tail
EXT3-fs: Unrecognized mount option "gid=100" or missing value
Inbound IN=ppp0 OUT= MAC= SRC=124.106.117.25 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=2276 DF PROTO=TCP SPT=3972 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.117.25 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=3953 DF PROTO=TCP SPT=3972 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0
EXT3-fs: Unrecognized mount option "gid=100" or missing value
Inbound IN=ppp0 OUT= MAC= SRC=124.106.123.87 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=64078 DF PROTO=TCP SPT=3391 DPT=139 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.123.87 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=124 ID=64992 DF PROTO=TCP SPT=3391 DPT=139 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.65.62 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=59939 DF PROTO=TCP SPT=3774 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.65.62 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=60809 DF PROTO=TCP SPT=3774 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.117.158 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=15210 DF PROTO=TCP SPT=4037 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0
Inbound IN=ppp0 OUT= MAC= SRC=124.106.117.158 DST=124.106.192.55 LEN=48 TOS=0x00 PREC=0x00 TTL=123 ID=15908 DF PROTO=TCP SPT=4037 DPT=445 WINDOW=64240 RES=0x00 SYN URGP=0

why is that?

Offline

#11 2006-04-15 07:43:20

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: permissions problem

/dev/hda6 /mnt/hda6 ext3 noatime,gid=users,fmask=117,dmask=007 0 1 

i dont think you want to use "gid=users,fmask=117,dmask=007 "
on an ext3 partition
i use

/dev/hda6 /mnt/hda6 ext3 noatime,user,rw,exec 0 0

will give all access to users on ext3 file system

Offline

Board footer

Powered by FluxBB