Solaris – configure ftp server
SUN Solaris FTP
SUN Solaris comes with ftp daemon based on WU-FTPd Washington University project.
While not being very enthusiastic about its vulnerabilities discovered over the years and being rather
abandoned by its developers ,still it comes by default and as long as Sun ok with that it is ok with me too.
Below I will shortly introduce configuring it for local user access as well as anonymous one.
By default FTP daemon (in.ftpd) is disabled. Here is the initial state you have it :
root@Solaris# svcs ftp
STATE STIME FMRI
disabled 7:21:44 svc:/network/ftp:default
As ftpd is inet managed daemon more information can be queried from inetadm:
root@Solaris# inetadm -l svc:/network/ftp:default
SCOPE NAME=VALUE
name=”ftp”
endpoint_type=”stream”
proto=”tcp6″
isrpc=FALSE
wait=FALSE
exec=”/usr/sbin/in.ftpd -a”
user=”root”
default bind_addr=”"
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=FALSE
default tcp_wrappers=FALSE
default connection_backlog=10
Insecure you say , well , you are right – let’s sharpen it a bit.
Enable more detailed logging.
root@Solaris# inetadm -m svc:/network/ftp:default tcp_trace=TRUE
root@Solaris# inetadm -m svc:/network/ftp:default user=”ftpuser”
root@Solaris# inetadm -l svc:/network/ftp
SCOPE NAME=VALUE
name=”ftp”
endpoint_type=”stream”
proto=”tcp6″
isrpc=FALSE
wait=FALSE
exec=”/usr/sbin/in.ftpd -a”
user=”ftpuser”
default bind_addr=”"
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
tcp_trace=TRUE
default tcp_wrappers=FALSE
default connection_backlog=10
When execution option –a is given (and it is by default) then ftpd will consult /etc/ftpd/ftpaccess
file for additional restrictions and tweaks. Here are the few that are worth enabling.
Uncomment following lines to have more verbose logging available:
log transfers real,guest,anonymous inbound,outbound
xferlog format %T %Xt %R %Xn %XP %Xy %Xf %Xd %Xm %U ftp %Xa %u %Xc %Xs %Xr
Make sure these changes are applied
root@Solaris# svcadm refresh svc:/network/ftp:default
Configure anonymous access.
All the configs so far will allow only local valid users to connect by ftp and be automatically
placed in their respective home directories. To allow anonymous ftp access with dedicated chrooted for that folder there is a special set of tools to use. Actually it is just one script that does all the hard work behind the scenes – creates ftp user, creates directory tree , sets up needed permissions, sets up chrooted environment for the anonymous ftp user.
root@Solaris# ftpconfig /oracle/ftpuser 注意:这里的路径必须是已创建用户的家目录
Updating user ftp
Creating directory /oracle/ftpuser
Updating directory /oracle/ftpuser
root@Solaris#more /etc/passwd
ftpuser:x:2001:2001::/oracle/ftpuser:/bin/sh
That is all, now you can login anonymously and download anything from /export/home/ftp_pub/pub directory. To also allow upload there , change the upload option in “/etc/ftpd/ftpaccess” and set accordingly permissions on the Solaris level for the directory pub (777)
root@Solaris# vi /etc/ftpd/ftpaccess
upload class="anonusers" * /pub yes
#upload class="anonusers" * * no nodirs
root@Solaris# chmod 777 /etc/ftpd/ftpaccess
And finally enable it
root@Solaris# svcadm enable ftp
验证:
DOS环境下使用ftp
C:\Documents and Settings\Administrator>ftp 10.5.77.12
ftp> lcd D:\
Local directory now D:\.
参考文献:http://yurisk.info/2010/03/31/solaris-configure-ftp-server/
Solaris – configure ftp server的更多相关文章
- Guidance of Set up FTP Server
Step 1. Create a FTP folder in your C disk, named "FTPReport"(an example) Step 2. Install ...
- Setup FTP Server On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3
setsebool allow_ftpd_full_access onsetsebool -P ftp_home_dir on vsftpd (Very Secure File Transport P ...
- Setting up a Passive FTP Server in Windows Azure VM(ReplyCode: 227, Entering Passive Mode )
This post is authored by Lalitesh Kumar, Pradeep M G and reviewed by Avinash Venkat Reddy. Also spec ...
- arm 添加 ftp server 之 bftpd
本来想装vsftp 结果装上以后执行报错 Segmentation fault , 换到几个 其它的小型ftp server 软件 ,试了 Stupid-FTPd,不能用. bftpd 可以使用,Ti ...
- How to set up an FTP server on Ubuntu 14.04
How to set up an FTP server on Ubuntu 14.04 Setting up a fully-functional and highly secure FTP serv ...
- 多线程查询FTP Server上的文件
情形是这样的,最近做一个自动化的项目,当batch跑成功了,FTP Server上会有特定的生成文件.但是不确定是什么时候会有,大概是batch跑完了5分钟之内吧,所以在脚本里设置检查点的时候,需要每 ...
- NAT后面的FTP SERVER终极篇
原文引用:http://blog.chinaunix.net/uid-20592805-id-1918661.html 如果对于被动模式还有不同的意见,我们可以再看下这篇文章: http://ww ...
- mac osx 10.9 ftp server端口
开启 FTP Serversudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist 关闭 FTP Serversudo -s ...
- ftp server来源分析20140602
ftp server学习位和源代码分析片 记录自己的第一个开源的分析过程: 从源代码:野狐灯(我接下来的几篇文章是从源头:野狐灯,每个以下哪项不是他们设置.) 20140602 Ftp的源码目录例如 ...
随机推荐
- 面试官:怎么做JDK8的垃圾收集器的调优?
面试官:怎么做JDK8的垃圾收集器的调优? 看着面试官真诚的眼神,心中暗想看起来年纪轻轻却提出如此直击灵魂的问题.擦了擦额头上汗,我稍微调整了一下紧张的情绪,对面试官说: 在JDK8中有Serial收 ...
- 【SP2916】Can you answer these queries V - 线段树
题面 You are given a sequence \(a_1,a_2,...,a_n\). (\(|A[i]| \leq 10000 , 1 \leq N \leq 10000\)). A qu ...
- js使用html2canvas 生成图片然后下载
1:html2canvas官网 首先去官网把这个JS下载下来 <!DOCTYPE html> <html lang="en"> <head> & ...
- EXCEL 中数据 批量 填充进 word 中
工具:Python3.7 需求描述:将EXCEL中 第二行 数据 填在 word 对应位置上,然后保存为 "姓名+任务.docx"文件. 再将EXCEL中 第三行 数据 填在 wo ...
- 精确到小数点后n位的两种方法
引言:大家在写程序中多多少少会遇到这个问题,特别对一些初学者会出现这个问题,做个ACM竞赛的同学肯定都会用C语言的printf格式控制输出,但是习惯于用C++的同学也不是一点办法都没有啊,这篇blog ...
- 运行SQL文件报错:Got a packet bigger than 'max_allowed_packet' bytes With statement:
英文意思:需要使用一个和现在相比较大的空间,可能mysql中的默认空间比文件需要的空间要小 解决方法: 1.修改配置文件中mysql的默认空间大小:在MYSQL的配置文件 my.in ...
- WordCloud教程(上)
先贴代码: import wordcloud,jieba with open('datas/1.txt') as rt:#,encoding='utf-8' comment_text=rt.read( ...
- 痞子衡嵌入式:解锁i.MXRTxxx上FlexSPI模块自带的地址重映射(Remap)功能
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是i.MXRT三位数系列隐藏的FlexSPI Remap功能. 前段时间痞子衡写了一篇文章 <利用i.MXRT1060,1010上新 ...
- dpkg:处理 xxx (--configure)时出错解决办法
1.$ sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名2.$ sudo mkdir /var/lib/dpkg/info ...
- 个人项目wordcount
1.Github项目地址:https://github.com/inimble/wordcount.git 2.估算耗费的时间(如右表) PSP2.1 Personal Software Proces ...