Guest User

Untitled

a guest
Mar 25th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. zsh: permission denied: ./bc.sh
  2.  
  3. sudo mount -t cifs -o username=user,passwordpass=,exec,rw,users,file_mode=0777,dir_mode=0777 //192.168.0.3/folder /mnt/Win7
  4.  
  5. -rwxrwxrwx 0 root root 24 Dec 10 20:50 bc.sh
  6.  
  7. #!/bin/bash
  8. echo "Test"
  9.  
  10. sudo: unable to execute ./bc.sh: Permission denied
  11.  
  12. sh path/to/bc.sh
  13.  
  14. [liveuser@localhost-live ~]$ ls -l ~/*.sh
  15. -rw-rw-rw-. 1 liveuser liveuser 28 Mar 25 07:55 /home/liveuser/testnox.sh
  16. -rwxrwxrwx. 1 liveuser liveuser 28 Mar 25 07:23 /home/liveuser/test.sh
  17. [liveuser@localhost-live ~]$ ~/test.sh
  18. Hello world.
  19. [liveuser@localhost-live ~]$ ~/testnox.sh
  20. bash: /home/liveuser/testnox.sh: Permission denied
  21. [liveuser@localhost-live ~]$ sh ~/testnox.sh
  22. Hello world.
  23.  
  24. [liveuser@localhost-live ~]$ sestatus
  25. SELinux status: enabled
  26. SELinuxfs mount: /sys/fs/selinux
  27. SELinux root directory: /etc/selinux
  28. Loaded policy name: targeted
  29. Current mode: enforcing
  30. Mode from config file: enforcing
  31. Policy MLS status: enabled
  32. Policy deny_unknown status: allowed
  33. Max kernel policy version: 30
  34. [liveuser@localhost-live ~]$ sudo setenforce 0
  35. [liveuser@localhost-live ~]$ sestatus
  36. SELinux status: enabled
  37. SELinuxfs mount: /sys/fs/selinux
  38. SELinux root directory: /etc/selinux
  39. Loaded policy name: targeted
  40. Current mode: permissive
  41. Mode from config file: enforcing
  42. Policy MLS status: enabled
  43. Policy deny_unknown status: allowed
  44. Max kernel policy version: 30
  45. [liveuser@localhost-live ~]$ sudo setenforce 1
  46. [liveuser@localhost-live ~]$ sestatus
  47. SELinux status: enabled
  48. SELinuxfs mount: /sys/fs/selinux
  49. SELinux root directory: /etc/selinux
  50. Loaded policy name: targeted
  51. Current mode: enforcing
  52. Mode from config file: enforcing
  53. Policy MLS status: enabled
  54. Policy deny_unknown status: allowed
  55. Max kernel policy version: 30
  56.  
  57. [liveuser@localhost-live ~]$ ls -l original
  58. total 4
  59. -rwxrwxr-x. 1 liveuser liveuser 28 Mar 25 08:14 test.sh
  60. [liveuser@localhost-live ~]$ ls -l alias
  61. total 4
  62. -rwxrwxr-x. 1 liveuser liveuser 28 Mar 25 08:14 test.sh
  63. [liveuser@localhost-live ~]$ original/test.sh
  64. Hello world.
  65. [liveuser@localhost-live ~]$ alias/test.sh
  66. bash: alias/test.sh: Permission denied
  67. [liveuser@localhost-live ~]$ sh alias/test.sh
  68. Hello world.
  69. [liveuser@localhost-live ~]$ sudo mount -o remount,exec --bind original alias
  70. [liveuser@localhost-live ~]$ alias/test.sh
  71. Hello world.
Add Comment
Please, Sign In to add comment