| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Fri Feb 25, 2011 12:25 pm    Post subject: file and folder permission |   |  
				| 
 |  
				| Hi! 
 I used SMS 1.5.6 x86
 
 when i upload files to my server on the root folder ( /srv/www/htdocs/) with webftp user by filezilla ftp program
 
 but i can not change permission of files, the permission denined.
 
 How to config the problem?
 
 Thank you
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Fri Feb 25, 2011 3:23 pm    Post subject: |   |  
				| 
 |  
				| webftp user has read only access by default, if you have install kde run gproftpd and edit permissions rights for webftp, or edit /etc/proftpd.conf and in user webftp  add
 SITE  SITE_CHMOD  SITE_CHGRP  MTDM
 in <limit ... >
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Sat Feb 26, 2011 8:17 am    Post subject: |   |  
				| 
 |  
				| Thank you 
 I try do it.
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Sun Feb 27, 2011 5:35 am    Post subject: |   |  
				| 
 |  
				|  	  | gerasimos_h wrote: |  	  | webftp user has read only access by default, if you have install kde run gproftpd and edit permissions rights for webftp, or edit /etc/proftpd.conf and in user webftp  add
 SITE  SITE_CHMOD  SITE_CHGRP  MTDM
 in <limit ... >
 
 gerasimos_h
 | 
 
 
 MY Proftpd.conf
 
 ####################
 ServerType standalone
 DefaultServer on
 Umask 022
 ServerName "SMS FTP"
 ServerIdent on "SMS FTP Server"
 ServerAdmin root@sms
 IdentLookups off
 UseReverseDNS off
 Port 21
 PassivePorts 49150 65534
 #MasqueradeAddress None
 TimesGMT off
 MaxInstances 30
 MaxLoginAttempts 3
 TimeoutLogin 300
 TimeoutNoTransfer 120
 TimeoutIdle 120
 DisplayLogin welcome.msg
 DisplayChdir .message
 User nobody
 Group nobody
 DirFakeUser off nobody
 DirFakeGroup off nobody
 DefaultTransferMode binary
 AllowForeignAddress off
 AllowRetrieveRestart on
 AllowStoreRestart on
 DeleteAbortedStores off
 TransferRate RETR 30
 TransferRate STOR 40
 TransferRate STOU 40
 TransferRate APPE 40
 SystemLog /var/log/secure
 RequireValidShell off
 #gp_random_username_length 6
 #gp_random_password_length 6
 #gp_randomize_case lower
 #gp_useradd_homedir_path /var/ftp
 #gp_useradd_upload_path /upload
 #gp_html_path /var/www/html/ftp.htm
 #gp_welcome_name welcome.msg
 <IfModule mod_tls.c>
 TLSEngine off
 TLSRequired auth+data
 TLSVerifyClient off
 TLSProtocol SSLv23 TLSv1
 TLSLog /usr/var/log/proftpd_tls.log
 TLSRSACertificateFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSRSACertificateKeyFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSCACertificateFile /etc/gadmin-proftpd/gadmin-proftpd.pem
 TLSRenegotiate required off
 </IfModule>
 <IfModule mod_ratio.c>
 Ratios off
 SaveRatios off
 RatioFile "/restricted/proftpd_ratios"
 RatioTempFile "/restricted/proftpd_ratios_temp"
 CwdRatioMsg "Please upload first!"
 FileRatioErrMsg "FileRatio limit exceeded, upload something first..."
 ByteRatioErrMsg "ByteRatio limit exceeded, upload something first..."
 LeechRatioMsg "Your ratio is unlimited."
 </IfModule>
 <Limit LOGIN>
 AllowUser ftpuser
 AllowUser webftp
 DenyALL
 </Limit>
 
 <Anonymous /var/ftp>
 User ftpuser
 Group nobody
 AnonRequirePassword on
 MaxClients 5 "The server is full, hosting %m users"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio ftpuser 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR  SITE  SITE_CHMOD  SITE_CHGRP  MTDM  PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit NOTHING >
 DenyAll
 </Limit>
 </Anonymous>
 
 <Anonymous /srv/httpd/htdocs>
 User webftp
 Group nobody
 AnonRequirePassword on
 MaxClients 5 "The server is full, hosting %m users"
 DisplayLogin welcome.msg
 DisplayChdir .msg
 UserRatio webftp 0 0 0 0
 <Limit LOGIN>
 Allow from all
 Deny from all
 </Limit>
 AllowOverwrite off
 AllowOverwrite on
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR SITE SITE_CHMOD SITE_CHGRP MTDM PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 </Limit>
 <Limit SITE  SITE_CHMOD  SITE_CHGRP  MTDM >
 DenyAll
 </Limit>
 </Anonymous>
 GroupPassword nobody 1107IN7zos9bs
 
 ########################
 
 the webftp can not change permission of files.
 
 ###### Add Command at webftp user #########
 <Limit LIST NLST  STOR STOU  APPE  RETR  RNFR RNTO  DELE  MKD XMKD SITE_MKDIR  RMD XRMD SITE_RMDIR SITE SITE_SITE_CHGRP MTDM PWD XPWD  SIZE  STAT  CWD XCWD  CDUP XCUP >
 AllowAll
 ###############
 
 
 How i do it?
 
 thank you
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Sun Feb 27, 2011 10:17 am    Post subject: |   |  
				| 
 |  
				| Change in webftp user 
  	  | Code: |  	  | <Limit SITE SITE_CHMOD SITE_CHGRP MTDM > DenyAll
 </Limit>
 | 
 to
 
  	  | Code: |  	  | <Limit NOTHING > DenyAll
 </Limit>
 | 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Mon Feb 28, 2011 4:30 am    Post subject: |   |  
				| 
 |  
				|  	  | gerasimos_h wrote: |  	  | Change in webftp user 
  	  | Code: |  	  | <Limit SITE SITE_CHMOD SITE_CHGRP MTDM > DenyAll
 </Limit>
 | 
 to
 
  	  | Code: |  	  | <Limit NOTHING > DenyAll
 </Limit>
 | 
 
 gerasimos_h
 | 
 
 It worked.
 
 Thank you very much.
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Mon Feb 28, 2011 11:32 am    Post subject: |   |  
				| 
 |  
				| Sory!   
 I have new problem
 
 When I upload the same file to server it can not overwrite file.
 
 Help me please. How to do it?
 
 Thank you.
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Mon Feb 28, 2011 1:10 pm    Post subject: |   |  
				| 
 |  
				| Remove from webftp user 
 AllowOverwrite off
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| Slackwan Junior Member
 
 
 Joined: 04 Jul 2010
 Posts: 14
 
 
 | 
			
				|  Posted: Wed Mar 02, 2011 5:18 am    Post subject: |   |  
				| 
 |  
				|  	  | gerasimos_h wrote: |  	  | Remove from webftp user 
 AllowOverwrite off
 
 gerasimos_h
 | 
 
 Thank you
 
 It worked.
 |  | 
	
		| Back to top |  | 
	
		|  |