LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting up ftp accounts under CPanel (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-ftp-accounts-under-cpanel-487319/)

dc144 09-27-2006 03:43 AM

setting up ftp accounts under CPanel
 
Hi All,

I bought a web hosting plan and trying to set up my web site. It's a Linux sharing hosting, using CPanel 10.8.2-RELEASE 119. When setting ftp accounts, face some difficulties to set up the structure.

Below is what I hope to obtain:
1. A main ftp account which can upload and download from any of the directories.
2. A few download only ftp account which can only download from their respective home directory and no where else.
3. A few upload only ftp account which can only upload to their respective home dir and no where else.

I start by creating ftp account in FTP Manager of CPanel, then using shell access hope to use chmod to get what I want. But realise that all the folders created belong to the main account both under user and group. No matter how I chmod, it will affect both the main account and the download account at the same time. I can't seperate them, ie. to let main account have read, write, access, and download account have only read and access permission.

My provider also still figuring how to get around with this.

Is there any back door administration needed?

Could anyone please kindly help?

Thanks!

Mara 09-27-2006 04:06 PM

It depends on the ftp server used. Do you have any chance to get that info?

dc144 09-27-2006 08:09 PM

Should be running Pure-FTPd.
I used dos command prompt to login in and this is the welcome message:

220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:06. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.


Quote:

Originally Posted by Mara
It depends on the ftp server used. Do you have any chance to get that info?


JimBass 09-27-2006 08:37 PM

You are not going to be able to set up an account that can upload/download to/from any directory. The only account that can do that is root, and 99.9% of ftp servers do not allow root to login through ftp, for the simple reason that it is hyper unsecure.

The "standard" procedure to get around this is to upload the files into a home directory of a standard user, then through SSH, sign in as that regular user, elevate permissions to root, move the files to the restricted folder (/var/www/?), then change ownership and permissions as necessary. Sounds like a lot of work, but it is just a few commands.

As for the other things you asked about, it is fairly standard procedure to chroot users into their home directory through ftp. That only gives them access to their home, and nowhere else. They can both upload and download this way, which generally isn't a problem, as they are the owners of every file they can see. Google for for to do that with pro-ftp. In vsftpd, it is one line in the conf file, and probably similiar with pro-ftp.

Peace,
JimBass

dc144 09-27-2006 09:32 PM

Thanks JimBass,

But what I mean was not as a root user, I am just one of the normal user the web hosting company created for me to login. This is the main user account where I can upload/download anywhere in my web space. I used FTP Manager in CPanel to create some more ftp user accounts. Those ftp user account are not a username in the server.

when I login as main account in ftp, I just type in the username, eg. david but when login with those account created by FTP Manager, have to type in username@mydomain.org at the userid field. Those account indeed have their own home dir and they are indeed restricted inside there. But how to set so that they are read only account?

By the way, is there a way to not to type in username@mydomain.org as userid, I just hope to type in the username only.

TIA


Quote:

Originally Posted by JimBass
You are not going to be able to set up an account that can upload/download to/from any directory. The only account that can do that is root, and 99.9% of ftp servers do not allow root to login through ftp, for the simple reason that it is hyper unsecure.

......

Peace,
JimBass



All times are GMT -5. The time now is 04:09 AM.