The Problem If accidentally the context or file permission of files under user’s home directory had been changed, permission errors or unexpected application behavior might be encountered after this user login system. For instance, if the file permission of /home/user1/.bash_profile is wrong, login user1 will get prompt “/home/user1/.bash_profile: Permission denied”: login as: user1 user1@geeklab’s password: […]
Archives for February 2018
Understanding How Umask Controls the Initial File / Directory Permissions in Linux
Controlling Initial File / Directory Permissions When new files and directories are created in Linux, default permissions are initially set. These permissions are calculated by taking the default permissions of the files/directories created and subtracting the umask value from it. The umask is a four-digit octal number that represents the value of permissions that will […]
How to manage File and Directory Permissions/Ownerships in Linux
File Ownership Every file is owned by a specific user (or UID) and a specific group (or GID). The chown command can be used to change just the user or the user and group of a file. Here is an example of changing the owner of file “file1” to “user” and its “user” to users. […]
Determining disk usage in Linux using “du” command
Determining Disk Usage The du command shows the estimated disk space used by files and directories. If you execute du without any options it will output the sizes of all files starting in your current directory and all subdirectories of your current directory. Find out how much disk space the /home directory is using with […]
Linux OS Service ‘hplip’
HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. The HPLIP project provides printing support for 1,292 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. (Note: Not all models are currently supported). The Hewlett-Packard […]
How to Copy / Move Files and Directories in Linux with “cp” and “mv” commands
Copy Files and Directories The cp command will copy files and directories or copy multiple sources to a destination directory. The basic syntax of the cp command is: # cp [options] source destination If you have multiple files/directories to be coped to a destination directory, use the below command syntax. # cp [options] source1 source2 […]