Ubuntu chmod Unable to change folder permissions system Prompt "Actions not allowed 2, Linux how to modify read-only files 3, Ubuntu installation

Source: Internet
Author: User

1. Ubuntu chmod Unable to change folder permissions system Prompt "actions not allowed

Answer: Require Superuser privileges sudo

2, Linux How to modify read-only files

Answer: You can use the chmod command to provide additional permissions for changing files. U means user, a for all, G for Group, R for readable, W for writable, X for executable, you can use "chmod a+w test.c" To add permissions, which is a convenient and intuitive way

3. Ubuntu install Samba implementation with Windows file sharing

To enable the sharing of resources between Windows hosts and Linux servers, the Linux operating system provides samba services, and the Samba service bridges two different operating systems, enabling communication between Linux systems and Windows systems. Provides great convenience for a wide range of Linux enthusiasts. This article briefly describes how to build a Samba server and simple configuration on a Linux operating system.

1,samba installation and configuration on server-side Linux machines:

the Samba service is not installed by default in the Ubuntu server version. You need to manually use Apt-get to install:

(1) Enter the following command in the terminal:

#sudo Apt-get Installsamba
#sudo Apt-get installsmbclient

Some versions also require installation of SMBFS: sudo apt-get install SMBFS but generally not required.

(2) startup, shutdown, and restart of the Samba server:

After the installation is complete, you can CD to the/etc/init.d/directory, locate the SMBD command, and then execute the following command:


StartSambaServer:#sudo/etc/init.d/smbdStart

Shut downSambaServer:#sudo/etc/init.d/smbdStop

RestartSambaServer:#sudo/etc/init.d/smbdRestart


StartSambaServer, you can use thePscommand to view the process:#ps-aux. At this timeCan seeSamba The service starts two services at the same time, where smbd Mainly used to manage shared directories, NMBD mainly used to parse name. In windows system, The host can be added to a group so that each host must have a name that is used to be the name of the logo on the web, not the hostname of the machine, which is called name. Among them nmbdsmbd The process starts and starts.

(3) Create a shared directory:

Makedir/home/steven/share

(4) Change directory permissions: (This is important and easy to ignore.) If not added, the current user-initiated Samba program will not be able to access the share directory

sudo chmod777/home/steven/share

(5)ConfigurationSamba service (modify Samba profile)

samba /etc/samba/smb.confnetbios/etc/samba/lmhosts
linux shared directory: linux< Span style= "font-family: the song Body;" > share a directory, write the setup information of the established directory to /etc/smb.conf file.

To modify the Samba configuration file smb.conf:

sudo cp/etc/samba/smb.conf/etc/samba/smb.conf.bak// better make a backup before modifying the configuration file

vim/etc/samba/smb.conf or open the configuration file with sudo gedit/etc/samba/smb.conf

Make the following changes to the contents of the file as follows:

#security =user Delete the comment and modify it to:security=share

Add the following line at the end of the file:

[Share]
Comment=this is Linux share directory
Path=/home/steven/share
Public=yes
Writable=yes
browseable = yes

Save exit, start Samba service:#/etc/init.d/smbdstart


(6) Create a Samba account:

Create account information file: smbpasswd: (Note that the file name must be SMBPASSWD, although the initiator is SMBD, you cannot name it smbdpasswd, or the program does not recognize the file: sudo touch/etc/samba/ smbpasswd

Add the Samba user to the file and set the password: sudo smbpasswd-a Steven (you will be asked to enter the password for your Samba account here)

[If there is no step above, when you log in, you will be prompted to the session setup Failed:nt_status_logon_failure]

(7) Restart the Samba server for the configuration file changes to take effect:#sudo/etc/init.d/smbd Restart


At this point, Samba's basic setup is complete! The following tests are available:

2. Check if Samba is installed correctly:

(1) Start Samba client program:smbclient-l //localhost/share

At this point, you will be asked to enter a user name and password (here the user name and password is the one set in the previous SMBPASSWD file)

For example: [Email protected]:/etc/samba$smbclient-l//localhost/share

Enter Steven ' Spassword:

After entering your password, you will be given the following information: To prove that samba service is working correctly:

Domain=[workgroup] Os=[unix]server=[samba 3.6.6]
Sharename Type Comment
--------- ---- -------
ipc$ IPC IPC Service (Ubuntu server (Samba, Ubuntu))
Share Disk This is Linux share directory
print$ Disk Printer Drivers
Domain=[workgroup] Os=[unix] Server=[samba 3.6.6]

Server Comment
--------- -------
A-pc

Steven

Allen

...............................


(2) under Windows access to the shared directory, you can click to run, enter \\192.168.0.10\share, so that the anonymous user access to the shared directory share .

No Write permission on Windows:chmod-r go+rwx share/

Ubuntu chmod Unable to change folder permissions system Prompt "Actions not allowed 2, Linux how to modify read-only files 3, Ubuntu installation

Related Article

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.