| Author |
Message |
aot2002
Joined: 27 Mar 2009
Posts: 28
|
| Posted: Wed Aug 26, 2009 11:40 am Post subject: Ftp Chmod 755 |
|
|
I have two users who I want in the same ftp directory and I know if the chmod is right each user should be able to upload and have the same permissions..
currently proftpd wont allow 755 permissions.
How else can i solved this issue I've tried local umask but im a bit stumped ? |
|
| Back to top |
|
Xan
Joined: 08 Feb 2004
Posts: 562
Location: Austin
|
| Posted: Wed Aug 26, 2009 2:44 pm Post subject: |
|
|
| It's really inappropriate to be running FTP over the public Internet. |
|
| Back to top |
|
aot2002
Joined: 27 Mar 2009
Posts: 28
|
| Posted: Wed Aug 26, 2009 2:55 pm Post subject: |
|
|
I understand the risks thanks
anyone else |
|
| Back to top |
|
saman007uk
Joined: 16 Oct 2004
Posts: 168
|
| Posted: Wed Aug 26, 2009 5:00 pm Post subject: |
|
|
| What do you mena by "currently proftpd wont allow 755 permissions. "? Error messages, logs ... |
|
| Back to top |
|
aot2002
Joined: 27 Mar 2009
Posts: 28
|
| Posted: Wed Aug 26, 2009 8:48 pm Post subject: |
|
|
for security reasons proftpd doesnt allow uploaded files to be chmod 755 only directories.
I guess im looking for a solution to allow Two users to be able to upload to one directory without conflicts.
if anyone has an example of vsftpd or proftpd that use's multiple users I'd be interested in seeing their config files |
|
| Back to top |
|
mwalling
Joined: 10 Dec 2007
Posts: 335
|
| Posted: Thu Aug 27, 2009 10:57 am Post subject: |
|
|
Thats because the 1 bit means "execute". Directories need execute permissions to be entered. Files need execute permissions to be executed. If proftpd allowed files to be executable, it might allow for arbitrary code execution.
I'd suggest understanding what the 7 and 5 in '755' mean, and then applying that knowledge to the files you're trying to upload.
And your response to Xan concerns me... *DO* you actually understand the risks? Assuming you're using the system users for proftpd, you do realize you're sending the system passwords in the clear over the internet? The same passwords that could then be used to log into your node? |
|
| Back to top |
|
aot2002
Joined: 27 Mar 2009
Posts: 28
|
| Posted: Thu Aug 27, 2009 11:19 am Post subject: |
|
|
mwalling wrote: Thats because the 1 bit means "execute". Directories need execute permissions to be entered. Files need execute permissions to be executed. If proftpd allowed files to be executable, it might allow for arbitrary code execution.
I'd suggest understanding what the 7 and 5 in '755' mean, and then applying that knowledge to the files you're trying to upload.
And your response to Xan concerns me... *DO* you actually understand the risks? Assuming you're using the system users for proftpd, you do realize you're sending the system passwords in the clear over the internet? The same passwords that could then be used to log into your node?
Agreed I understand the risks because whats going in the Ftp directory is not important and not for web usage and not accessible by any other source to the outside world etc... also it has disk space limitations etc.. etc.. even if it was compromised i have a script that checks which IP logged in.
I just need the ability for each user to share a directory, I was hoping adding them both to the same group would allow this but not such luck with the restrictive permission settings |
|
| Back to top |
|
Xan
Joined: 08 Feb 2004
Posts: 562
Location: Austin
|
| Posted: Thu Aug 27, 2009 1:00 pm Post subject: |
|
|
| It sounds like it will work, but as mwalling said, you need to examine the need for the execute bit on your files. |
|
| Back to top |
|
aot2002
Joined: 27 Mar 2009
Posts: 28
|
| Posted: Thu Aug 27, 2009 2:06 pm Post subject: |
|
|
Xan wrote: It sounds like it will work, but as mwalling said, you need to examine the need for the execute bit on your files.
Ok well I don't need execute I just need both users ability to share one set of files / directories |
|
| Back to top |
|
Xan
Joined: 08 Feb 2004
Posts: 562
Location: Austin
|
| Posted: Thu Aug 27, 2009 2:20 pm Post subject: |
|
|
| If you don't need the execute bit, why are you setting it? |
|
| Back to top |
|
Guspaz
Joined: 26 May 2009
Posts: 1147
Location: Montreal, QC
|
| Posted: Thu Aug 27, 2009 3:31 pm Post subject: |
|
|
You don't seem to understand the risks here. It's not about the security that you've set up around your FTP server, it's that the user passwords will be vulnerable to interception. At that point, your FTP security is irrelevant, because the attacker can get in via SSH or any other protocol exposed by your server; they have the passwords.
There are very few legitimate reasons to be running plain FTP in this day and age. It's strongly recommended that you use SFTP/SCP instead. |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 1058
|
| Posted: Thu Aug 27, 2009 5:19 pm Post subject: |
|
|
The only reason anyone besides a braindead shared host would run plain FTP is anonymous FTP. But maybe that will do what the OP wants?
Or if you want to forgo all the advice given above, let the two users log in with the same ID/password and hence upload to the same account's home directory. I mean, if they're going to share the same directory and all the same files, what's the point of keeping one user's password secret to the other? |
|
| Back to top |
|
mikeshoup
Joined: 27 Apr 2004
Posts: 30
|
| Posted: Fri Aug 28, 2009 3:26 pm Post subject: |
|
|
Read up on UNIX permissions:
http://www.zzee.com/solutions/unix-permissions.shtml
The best way to do it, put both users in the same group, then give the files/directories group write access. You'll also need to make sure the files/directories are owned by said group.
Running FTP over the internet with cleartext passwords is sorta okay, as long as you're not using system accounts for your FTP logins. Last I checked, ProFTPd allows you to use the system accounts, or store the info in files or a SQL database.
This would be okay, provided the passwords used for these users are not the same as any other passwords.
However, passwords in cleartext is a *bad* idea. |
|
| Back to top |
|
Guspaz
Joined: 26 May 2009
Posts: 1147
Location: Montreal, QC
|
| Posted: Tue Sep 01, 2009 3:11 pm Post subject: |
|
|
Just preventing the system account from logging in via FTP is hardly sufficient. Imagine this scenario:
1) RegularUser logs in to FTP via public wifi
2) RegularUser's password is sniffed
3) EvilDude SSHs to your box
4) EvilDude runs a kernel root exploit
5) EvilDude changes your root password and has fun erasing/stealing your data and hosting up all sorts of nasty things
The only way to prevent this scenario is to not allow cleartext password authentication by *NOT* running FTP... |
|
| Back to top |
|
glg
Joined: 09 Jan 2009
Posts: 504
|
| Posted: Tue Sep 01, 2009 3:26 pm Post subject: |
|
|
Guspaz wrote: Just preventing the system account from logging in via FTP is hardly sufficient.
He said not using system accounts. ie, the FTP server only uses it's own accounts. So that #3 in your scenario isn't possible. |
|
| Back to top |
|
| |