ubuntu18 set up ftp server, file and directory permissions problem

 

Sometimes we do have a local desktop or cloud server, we want to take a ftp server so convenient to transport our intranet / extranet, save the file, so any other computer ah, ah equipment, as long as access the ftp address, you can transfer files it! Since my desktop machine is now in the laboratory, the network is a virtual subnet division College of external public network ip only one computer connected to different network lines, public network ip equipment in all laboratories are that one, so I can only put up a temporary network ftp so that I can transfer files. My desktop machine is ubuntu18 coat system.

Set up ftp uses a vsftpd. Many online tutorials, but few usable. . .

https://m.linuxidc.com/Linux/2017-06/144807.htm

This tutorial pro-test possible! But behind the need to use ftp xxx.xxx.xxx.xxx then get put to upload and download in cmd, unless you do not have a graphical interface. General to enter ftp://xxx.xxx.xxx.xxx directly in the browser and then will let you enter a user password, and then you can upload and download graphic files. Note To connect to the network, which means it can be accessed in the same segment!

Once configured ftp it will find a problem, open the desktop machine, the two users! One is the user you created earlier, there is a use of the ftp user. For the concept of linux, he is to multi-user operation, that is to say such as / have a user1 directory, there is a ftpuser1 directory home directory. You will find that you use to log linux ftpuser1 when the same access to everything in the computer! User1 include files in the directory! But can not write nothing, permission should be rx is readable, not writable, executable.

This time you need permission to modify the directory, for example, I want user1 directory only the directory owner (ie user1) read-write executables, other users can not read the read-through, then that is 700 permissions. Rights and the meaning of this code is very well written blog:

https://blog.csdn.net/langzi7758521/article/details/51190425

Linux command do not understand people may well gas, the owner, permissions, etc., how to see? The above blog wrote, ls -l or ls -ld. So out of the bunch, each character and what does it mean? ? Below this blog has a very good explanation:

https://blog.csdn.net/xianjie0318/article/details/65444938?locationNum=2&fps=1

Then get away, directly enter the command

sudo chmod 700 /home/user1

This is your current user1 users.

As for the course if you are 777, you need to add a -R

sudo chmod -R 777 file or folder name

This will ensure that all files in a folder inside the folder, file, Du Fu, the 777, because we are using a 700 permissions, that is, other users do not read readable, then the master file is not readable, which, of course, unreadable, and would not the -R.

 

Guess you like

Origin www.cnblogs.com/zhouxiaosong/p/11113754.html