Umask and file permissions
The umask is set when you log in, and is usually set in one of the default shell config files (like /etc/profile). You can override the umask for a particular user by setting their umask in the user’s shell profile, usually in “~/.bashrc”. The setting looks something like:
In the example above, the “2″ set for “group” and “other” means, instead of adding write permission to the created file, everything except write permission is added for those two categories. The “0″ means all permissions are set for the file owner.
The umask octal value is kind of the reverse of chmod permissions — you set it with an octal value, but instead of specifying the permissions you want the created file to have, you specify what you don’t want it to have.
You will sometimes see the umask expressed as four digits, like “0022“. Both styles work. That first digit is for setting some special permissions.
Unable to open configuration file /etc/psa/psa.conf: Permission denied
unable to open configuration file /etc/psa/psa.conf: Permission denied
Such errors are reported when Panel spam-filter processes incoming mail to mailbox with the Spamassasin feature enabled. Error is reported because spam-filter hook has no permission to access files in the /etc/psa directory. However, Spamassassin still processes messages correctly so this error does not mean Spamassassin is not working.
To workaround the issue it is possible to add the execute permissions for the /etc/psa folder.
Reference: http://parallels.com/
How can I get access to a Windows file system
By default, Linux supports direct read/write access to FAT16 and FAT32 file system that Microsoft Windows uses, but not to an NTFS file system.
To access an NTFS file system on Linux.
Install a third party software named kernel-module-ntfs. We can get the rpm package from
http://sourceforge.net/projects/linux-ntfs/files
The kernel-ntfs kernel module will be load automatically by default when server reboot next time. Then you can mount your ntfs file system manually. We can load the kernel module by modprobe and use lsmod to confirm it’s installed
modprobe kernel-ntfs
lsmod | grep ntfs
Install a third party software named ntfs-3g and fuse.
Please access http://www.tuxera.com/community/ntfs-3g-download/ to get ntfs-3g and fuse.
NTFS-3G is a stable, read/write NTFS driver for Linux, Mac OS X, FreeBSD, NetBSD, OpenSolaris, QNX, Haiku, and other operating systems. It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008 and Windows 7 NTFS file systems.
After successfully install, you can run command such as:
mount -t ntfs-3g /dev/sda2 /mnt
The /etc/modules.conf file
modules.conf - configuration file for loading kernel modules
The configuration file consists of a set of lines.
All empty lines, and all text on a line after a ‘#’, will be ignored.
Lines may be continued by ending the line with a ‘\’.
Example:
Driver for the Intel/Pro 1000 Network card which uses the e1000 driver.
The /etc/modules.conf file should only be modified if the system requires a driver that will be loaded during the boot sequence. The behavior of modprobe(8) (and depmod(8) ) can be modified by the (optional) configuration file /etc/modules.conf.
fsck - check and repair a Linux file system
fsck - check and repair a Linux file system
fsck is used to check and optionally repair one or more Linux file systems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems.
If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially.
This is equivalent to the -As options.
The exit code returned by fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - System should be rebooted
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - Fsck canceled by user request
128 - Shared library error
The exit code returned when multiple file systems are checked is the bit-wise OR of the exit codes for each file system that is checked.