Ubuntu use tips umask settings and existing domain redirection settings

Source: Internet
Author: User

Ubuntu use tips umask settings and existing domain redirection settings

Today, a good insight, always thought that in the DNS server can not be on the CN and other existing domain name set IP, the result of today tried, directly set up a xx.yy.cn domain, and then set up a and area of the same host head on the line, really!

Ubuntu Set Mask Value

Because PROFTP software on the server was uninstalled by me, now the colleague uploads the material through the ssh own openserver to upload, can this, the control authority has become a question, the main is, a colleague uploads the file, the default mask is 644, other colleague cannot change (in order to control the permission, Each colleague has a different user name). Previously in the FTP software is easy to set the Umask value, can this sshd inside how to set up also quite troublesome, tried the online often said/etc/profile ~/.profile files are not good, because I set the user name no home directory, naturally there is no ~/.profile file.

Vim/etc/profile inside a section

# The default umask is now handled by Pam_umask.

# See Pam_umask (8) and/etc/login.defs.

if [-D/ETC/PROFILE.D]; Then

For I in/etc/profile.d/*.sh; Do

If [-R $i]; Then

. $i

Fi

Done

unset I

Fi

And look at Man Pam_umask.

DESCRIPTION

Pam_umask is a PAM module to set the file mode creation mask of the current

Environment. The umask affects the default permissions assigned to newly

Created files.

The PAM module tries to get the Umask value from the following places in

The following order:

umask= argument

umask= entry in the user ' s GECOS field

umask= entry From/etc/default/login

UMASK entry From/etc/login.defs (influenced by Usergroups_enab in

/etc/login.defs)

Finally found a target in vim/etc/login.defs.

# If Usergroups_enab is set to ' yes ', that would modify this UMASK default value

# for private user groups, I. E. The UID is the same as GID, and username are

# The same as the primary group Name:for These, the user permissions would be

# used as group permissions, E. G 022 would become 002.

#

# Prefix These values with ' 0 ' to get octal, ' 0x ' to get hexadecimal.

#

Erasechar 0177

Killchar 025

UMASK 022 > 002

Test, the newly created file is 775 permissions, and the modification is complete.

Ubuntu use tips umask settings and existing domain redirection settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.