Thursday, July 5, 2012

Debian file permissions

list file permissions with ls -l

-  rwx   r_x    _wx
 

  • The first "-"  says the file type. d|f|s (directory, file, or symlink)
  • The next three chars "rwx" are the privileges for the user
  • And the next "r_x" are the privileges for the group.
  • "_wx" are the privileges for others

Note the "_"  means denied. or not set.

chmod u-r myfile means , remove read privileges from the user.

e.g.
nano myfile.
touch myfile.
echo "blah" >> myfile
cat myfile.

Restore Xorg.conf file in Debian/Mint/Ubuntu (Dual Monitor configuration in mint)


Heres what happend, I edited the xorg.conf file and when I restarted my PC, i got blank screens in both my monitors.

How I resolved it:?

1) Booted my PC with a Bootalble Linux Live Mint CD (same as OS),
2) Type "gparted"  into the filter text box  of the start menu or in terminal  window.
3) Once the partitions window is open , locate the partition name  that points to your hard drive's Linux partition.
Most probably it will be marked with /ext4/ . You should be able to figure it out, by looking at the details in 'gparted.'
4) Now mount it:  type: sudo mount /dev/sda1 /mnt  (Note: My mount location was /dev/sda1,..yours may be different)
5) cd /mnt/etc/x116) create a default xorg.conf file with the following content.
     
        Section "Device"
        Identifier      "Default Device"
        Option  "NoLogo"        "True"
        EndSection

7) Restart your machine everything should be fine.8) If you want dual monitor configuration, type NVedia X Server in the Start filter box, and use that application to configure your second monitor.Cheers.