Tekforums

Chat => Entertainment & Technology => Topic started by: Binary Shadow on June 12, 2013, 22:32:04 PM

Title: any linux bods?
Post by: Binary Shadow on June 12, 2013, 22:32:04 PM
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.
Title: Re: any linux bods?
Post by: bytejunkie on June 13, 2013, 08:15:12 AM
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...
Title: Re: any linux bods?
Post by: M3ta7h3ad on June 15, 2013, 04:44:44 AM
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

Title: Re: any linux bods?
Post by: Binary Shadow on June 15, 2013, 18:32:31 PM
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.
Title: Re: any linux bods?
Post by: M3ta7h3ad on June 16, 2013, 22:48:31 PM
Bosh. That's the way.

Sent from my Nexus 4 using Tapatalk 2