Koozali.org: home of the SME Server

admin access to user folders

stocky

admin access to user folders
« on: December 07, 2004, 01:21:08 AM »
Hi everyone. I have an SME server and have created all the users etc, and when i access the SME box from a windows machine, I log on and it shows me the "primary" folder and also relevant "username" folder as I would expect. BUT, when i log in as ADMIN i only get "primary" and "admin" folders and ACCESS DENIED to all the user folders (cant see them either!). How do I allow ADMIN to see and access ALL user folders? Same happens if I FTP in, i can access the admin folder, but get PERMISSION DENIED on all the user folders. I need access to these as ADMIN for maintenance etc. Any assistance greatly appriciated!
 :hammer:

Mumm-Ra

admin access to user folders
« Reply #1 on: December 07, 2004, 03:02:06 AM »
If you check the permissions for the individual users folder you'll see that only the owner has permission for the folder, the owner being the user in question.
The permissions are there for the purposes of security.
If you need access into these folder you could always SSH into your server as root

stocky

admin access to user folders
« Reply #2 on: December 07, 2004, 03:18:57 AM »
so can i give admin root permissions?
I need admin to have EASY (eg not SSH) access to user folders from windows explorer

Mumm-Ra

admin access to user folders
« Reply #3 on: December 07, 2004, 03:55:37 AM »
There is a way but it's probably not the correct way of doing this and could break your server :hammer:

You can change the group permission on your users folder to admin (or any other user/group) by typing at a command prompt
Code: [Select]
chown -R <username of user>:<username/groupname of user/group to be given permission> foldername
for example i've just created a test user so I connected to my server by SSH and typed
Code: [Select]
cd /home/e-smith/files/users
chown -R test:admin test

You then need to give the group permission read/write & possible execute
Code: [Select]
chmod -R 770 test
If I now type ls -l I can see that for my test user's folder test is still the owner, admin is the group, test still has w/r/e permissions and admin also has w/r/e permissions.
If I now type \\<servername>\test I can see test user's files, create files in test's folder, delete files and move files.

Again I don't know what else this will do to permissions so I would test this until you are sure that it hasn't broken something else. i.e email, user backups, password changes e.t.c

stocky

admin access to user folders
« Reply #4 on: December 07, 2004, 05:11:39 AM »
So if I create a number of groups and run that command for each group, i should then be able to access them. Cool! I will give it a bash  :-P

Mumm-Ra

admin access to user folders
« Reply #5 on: December 07, 2004, 05:50:58 AM »
The best way to do this would be to create a group and put the admin user in it.
Then set this group to be the group against your users folders.
If you would then like to add another user into this group you can do.

Again, this may screw up your system so test fully!

wallyrp

admin access to user folders
« Reply #6 on: December 07, 2004, 05:20:45 PM »
Good Morning,

This thread may address your issue:

http://forums.contribs.org/index.php?topic=21251.0

I haven't tried it yet but it appears that it should work. Let me know if this helps.

Mumm-Ra

admin access to user folders
« Reply #7 on: December 07, 2004, 05:30:03 PM »
definitely the correct way!

stocky

admin access to user folders
« Reply #8 on: December 14, 2004, 07:06:50 AM »
Worked Great!
only prob is that is shows the contents of the user folder including the mail folders and home folder, not just the contents of the home folder, but we can work with that.

This is the code i added to my smb.conf so if anyone as any ideas to get it to go direct to the users "home" dir and not show the mail folders.....
Code: [Select]

[admin_shares]
comment = home_directories
path = /home/e-smith/files/users/
valid users = admin root *your_user_name
admin users = admin root *your_username
write list = admin root *your_user_name
public = no
browsable = yes
writable = yes


I also want to make a "public" folder for all users to access....no logon or PW required. How do I go about doing this?

I tried making a public folder like an ibay. I created a dir and then used this code....
Code: [Select]

[public]
comment = Public i-bay
path = /home/e-smith/files/ibays/Public
read only = no
writable = yes
printable = no
inherit permissions = yes
create mode = 0640


I can see the folder but it denies my access to creat files or folders :-(

Help for newbies appriciated!

stocky

admin access to user folders
« Reply #9 on: December 14, 2004, 11:49:33 PM »
amazing what things you can do with the chmod command. :roll:

mbachmann

admin access to user folders
« Reply #10 on: December 15, 2004, 10:27:41 AM »
Look at chmod, chgrp and chown. If you click on "modify"  in server-manager panel "Information bays" it should let you set permissions for groups as well.