Category: Permission

  • how to backup and restore file permissions using acl

    $mkdir data $cd data/ $ls $pwd /home/jeffrin/data $echo hello > file1.txt $echo world > file2.txt $ls -l total 8 -rw-r–r– 1 jeffrin jeffrin 6 Jan 22 22:44 file1.txt -rw-r–r– 1 jeffrin jeffrin 6 Jan 22 22:44 file2.txt $getfacl -R . > permissions.txt $cat permissions.txt # file: . # owner: jeffrin # group: jeffrin user::rwx group::r-x […]

  • chattr practice session . I

    The following shows a command line session with chattr command which helps in changing attributes of files. $lsattr functions.txt ————-e– functions.txt $chattr -e functions.txt chattr: Clearing extent flag not supported on functions.txt $lsattr functions.txt ————-e– functions.txt $chattr +c functions.txt $lsattr functions.txt ——–c—-e– functions.txt $lsattr functions.txt ——–c—-e– functions.txt $chattr +a functions.txt chattr: Operation not permitted while […]

  • lsattr practice session . II

    The following shows a command line session with lsattr command which helps in listing file attributes. $lsattr ————-e– ./A.txt ————-e– ./beautyastudyin00rothuoft.pdf ————-e– ./trueprint-5.4.tar.gz.sig ————-e– ./sample ————-e– ./scsh-common-0.6_0.6.7-8_all.deb ————-e– ./photos ————-e– ./beautifulwork-sorting ————-e– ./Templates ————-e– ./apache2_2.4.7-1_amd64.deb ————-e– ./Pictures ————-e– ./a.out ————-e– ./sent ————-e– ./Videos ————-e– ./functions.txt~ ————-e– ./Desktop ————-e– ./books ————-e– ./myapp.rb ————-e– ./tmp ————-e– ./ethstatus_0.4.3.dsc […]

  • lsattr – list file attributes on a ext2fs

    The following shows a command line session with lsattr and stat commands which helps in listing file attributes. $lsattr -v colors 1936034688 ————-e– colors $lsattr colors ————-e– colors $ls -l colors -rw-r–r– 1 jeffrin jeffrin 173 Feb 17 21:46 colors $stat colors File: ‘colors’ Size: 173 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d […]

  • Testing Mail Servers with OpenSSL

    commandline session $ openssl s_client -connect pop.mail.yahoo.co.in:995 CONNECTED(00000003) depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance CA-3 verify error:num=20:unable to get local issuer certificate verify return:0 — Certificate chain 0 s:/C=US/ST=CA/L=Sunnyvale/O=Yahoo! Inc./CN=legacy.pop.mail.yahoo.com i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3 1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3 i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance […]

  • chmod – change file mode bits

    ABOUT chmod In Unix and Unix-like operating systems, chmod is the command and system call which is used to change the access permissions of file system objects (files and directories). It is also used to change special mode flags. The request is filtered by the umask. The name is an abbreviation of change mode.[1] TYPICAL […]