LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-06-2009, 11:10 PM   #1
KillaH425
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
Question User Permission and FTP


Hi,

I have a problem with my server. I am currently the root user, but my partners need access to the server as well, and they are running into constant permission problems. I made an account for them (named "cm") that does not have shell access but can be logged in via sftp (using rssh). I will make another username to supplement this one for only ftp access. But they cannot edit files and folders that are not chmod'ed at 777, and they cannot change the permissions themselves. Is there anyway I can change this? I have a (dv) server with mediatemple (www.mediatemple.net) that runs CentOS 4. Thanks in advance.
 
Old 01-07-2009, 02:28 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Simply make use of groups and chmod

Here is a quick example to illustrate what I mean


deb:~# mkdir TEST
deb:~# chmod 02770 TEST

// NOTE the 's' in drwxrws
deb:~# ls -ld TEST
drwxrws--- 2 root root 4096 2009-01-06 17:15 TEST

deb:~# chgrp users TEST
deb:~# ls -ld TEST
drwxrws--- 2 root users 4096 2009-01-06 17:15 TEST

// NOW all files in TEST will have group users
deb:~# touch TEST/file
deb:~# ls -l TEST
total 0
-rw-r--r-- 1 root users 0 2009-01-06 17:15 file

// Last but not least, the file is created with the proper group but not the proper permissions. you can change this system wide by editing /etc/profile and changing umask 022 to umask 002

deb:~# umask 002
deb:~# rm TEST/file
deb:~# touch TEST/file
deb:~# ls -l TEST
total 0
-rw-rw-r-- 1 root users 0 2009-01-06 17:16 file

Hope this helps
 
Old 01-07-2009, 11:10 AM   #3
KillaH425
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I tried this but it didn't work. I think the underlying cause is one of two things. Either there is a restriction to changing the permissions (like the ftp program running chmod) due to lack of shell access, or there is some file that is only allowing root user to change permissions. I think I can temporarily fix it with just changing the owner and group of the folders, but its a pain to do that to each domain's worth of folders.
 
Old 01-07-2009, 11:37 AM   #4
KillaH425
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I think I inaccurately described my problem, my apologies. I have a temporary and incomplete fix by changing recursively changing the specific folders' owners and groups to that the username/group cm. But there are other users as well, and despite being in the group cm, those users cannot change the permissions of the folders or files.
 
Old 01-08-2009, 01:46 AM   #5
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
I think you need to go back to sftp's manual and see how permissions are managed or give then access to a shell and implement the above.

One way or the other this should be fairly simple to do. If you still have problems, I can try and look into it with you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp user permission manish_meet_in Linux - Software 0 01-17-2008 03:28 PM
Limited permission on FTP user stefane321 Linux - Security 3 03-04-2005 07:21 PM
permission peroblem using Ftp owais Linux - Networking 1 10-21-2004 05:15 AM
Ftp permission problem 360 Linux - Networking 4 02-19-2002 10:49 AM
FTP Permission Denied Rfriend@ucwv.edu Linux - Networking 2 08-23-2001 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration