News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

any linux bods?

Started by Binary Shadow, June 12, 2013, 22:32:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Binary Shadow

I'm a windows guy so struggling with the Linux permissions on my freenas setup.

Can anyone assist?

Basically the freenas runs on FreeBSD and theres a virtual copy of FreeBSD called a jail running within that.

I have folders from the freenas OS mounted into the jail OS

Now I have used chmod 777 on them to allow a web front end running on the jail OS access to write files into the mounted folders, this appears to use a www user account.

The folders are shared via cifs from the freenas OS side and I want to restrict the access for read and write to 1 user account (called user). However if I set that permission it stops the www account accessing the mounted folder to save files.

Is there a way to create a user that will match on both OS's and allow the permissions to be set the same? or do I need a group? or is this not even possible, I have no idea how users/groups work between 2 Linux machines, is it just a case that if the username and passwords match it'll work? or are there unique ID's on each OS.

Any help would be appreciated.

bytejunkie

i think i found, whern trying a very similar thing that users and groups are local to the machine you're on.

i found the best way on freenas was to just add an account to the wheels group that it preinstalls as the admin group. i ran everything under this and it worked ok, but i wasn't trying to permission up access from another linux box.

i think what you're going to find is that you need an ldap directory, but will shut up for a bit and see if someone else has tried this same approach....

pretty sure ive still got freenas on a drive in my nicroserver so might put this scenario together tonight. or i might just play starcraft...

M3ta7h3ad

It's difficult to make sense of your post wholly right now will have another think later but you basically need to read up on smb and Linux users and groups. There will be a way.

777 and running everything as root/wheel are the two biggest "f**k no!" Things you should definitely never do.

Sent from my Nexus 4 using Tapatalk 2


Binary Shadow

Quote from: M3ta7h3ad on June 15, 2013, 04:44:44 AM
777 and running everything as root/wheel are the two biggest "f**k no!" Things you should definitely never do.

Yeah I realise that hence the post.

I'll have a read and see if I can figure it out.

I have reset the permissions to owner www and created a group for user accounts to access the shares, set owner and group to rwx and removed permissions for everything else. Seems to work as expected.

M3ta7h3ad

Bosh. That's the way.

Sent from my Nexus 4 using Tapatalk 2