Koozali.org: home of the SME Server

chmod with FTP

msilkjr

chmod with FTP
« on: December 19, 2004, 11:55:00 PM »
Hello all,

First of all, I'm well aware of the risks that this creates.

I need to allow chmod via FTP can someone please tell me how to do this? Which templates and files need to be edited and with what?

Thanks

hackersoft

chmod with FTP
« Reply #1 on: July 18, 2006, 09:55:58 AM »
As for me, ftp is more convenient way of letting the users access their contents instead of giving them shell access but having ftp chmod denied for ftp becomes an inconvenience...

I suggest that admins be given the option to tweak the templates via the server-manager so noob users like me don't have to do it manually anymore.

Here's what I did to resolve this issue:

1. Access your SME box via WinSCP and login as root
2. Go to the directory below:
/etc/e-smith/templates/etc/proftpd.conf

3. Look for a file like 10LimitSiteChmod
4. Right-click and click edit.
5. Change the word Deny from DenyAll to Allow as in AllowAll
6. Access the server-manager
7. Click on Reboot or Shutdown
8. From the drop-down list click reconfigure
9. The SME Box will reboot with FTP CHMODding now allowed
10. Good Luck!

Offline raem

  • *
  • 3,972
  • +4/-0
chmod with FTP
« Reply #2 on: July 18, 2006, 10:55:24 AM »
hackersoft

ftp is not secure, that's why sme developers do not enable ftp functionality by default. They would prefer to take it out of the distribution completely.
Far better to use sftp as a minimum.


The advice you have given about editing templates directly is bad advice and is not the recommended method.
If you must use ftp and wish to make config changes via templates, then you should be copying the template fragment to the templates-custom folder, making your changes there and then expanding the template.
This way any changes you make can easily be undone (by deleting the custom fragment & expanding), and also the changes will survive upgrades etc.

Revised instructions based on your original

1. Access your SME box via Putty or WinSCP and login as root
2. Go to the directory:
/etc/e-smith/templates/etc/proftpd.conf

3. Look for a file like 10LimitSiteChmod

copy that fragment to
/etc/e-smith/templates-custom/etc/proftpd.conf

You may have to create this folder first
mkdir -p /etc/e-smith/templates-custom/etc/proftpd.conf

cd to the newly created fragment
cd /etc/e-smith/templates-custom/etc/proftpd.conf

4. Edit the new custom fragment 10LimitSiteChmod
5. Change the word Deny from DenyAll to Allow as in AllowAll
6. Access the server-manager
7. Click on Reboot or Shutdown
8. From the drop-down list click reconfigure (this will expand the templates & reboot)
9. The SME Box will reboot with FTP CHMODding now allowed
10. Good Luck!
...

hackersoft

chmod with FTP
« Reply #3 on: July 18, 2006, 11:02:01 AM »
Sorry for that.
It just so happened that this is my first try of using SME Server.
I can't seem to be able to find an example of getting it done from existing templates.
Thanks for your revision.
I'll try it out.

 :-)

Offline raem

  • *
  • 3,972
  • +4/-0
chmod with FTP
« Reply #4 on: July 18, 2006, 11:11:26 AM »
hackersoft

> I can't seem to be able to find an example of getting it done from existing templates.


There may not be a specific example already in existence for what you are trying to achieve.
Read the old docs for sme 6 and read the new Developers guide for sme7 as they both explain the concepts of using custom templates.

Also read the many howtos created by contributors for many practical examples, as well as those published directly on contribs.org wiki.
http://mirror.contribs.org/smeserver//contribs/
...

hackersoft

chmod with FTP
« Reply #5 on: July 18, 2006, 11:47:48 AM »
My apology.
I'll try to enhance my digging power next time.
Thanks for the advise. :-)