Article 6KPAB NAS & break permissions

NAS & break permissions

by
sunjob
from LinuxQuestions.org on (#6KPAB)
good day!

original data
- NAS / OpenMediaVault-3.0.94
- hd1,hd2 - 2 HDD EXT4, equally connected/shared CIFS/SAMBA
- on hd1 the permits were badly 'broken'
- a remote connection to the NAS was made and permissions were corrected.

next, point by point:

fixing permissions hd1
Code:cd /srv/dev-disk-by-label-hd1/hd1
chown -Rc sun:users ./
find ./ -type f -exec chmod 0664 {} +
find ./ -type d -exec chmod 0775 {} +
sync && rebootafter that, almost everything is OK, except for the 'unfinished execution-bit'.
hd2 - it's OK

disks are mounted in the same way
Code:sudo mount -t cifs //nas/hdX /mnt/nas_smb_hdX -o username=sun,password=@XXX@,vers=1.0Then, one by one, we go to the mounted directories and run the test:
- creating a text file, looking at permissions
- remove/set the 'x' bit, look

Code:#
# hd1
#

# create text file
main$ echo "text" > text.txt
main$ ls -l text.txt
-rw-rw---- 1 sun users 0 Mar 28 16:37 text.txt

# clear bit x
main$ chmod -x text.txt
main$ ls -l text.txt
-rw-rwx--- 1 sun users 0 Mar 28 16:37 text.txt*

# set bit x
main$ chmod +x text.txt
main$ ls -l text.txt
-rwxrwx--x 1 sun users 0 Mar 28 16:37 text.txt*

# clear bit x
main$ chmod -x text.txt
main$ ls -l text.txt
-rw-rwx--- 1 sun users 0 Mar 28 16:37 text.txt*

#
# hd2
#

# create text file
main$ echo "text" > text.txt
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 0 Mar 28 16:39 text.txt

# clear bit x
main$ chmod -x text.txt
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 0 Mar 28 16:39 text.txt

# set bit x
main$ chmod +x text.txt
main$ ls -l text.txt
-rwxrwxr-x 1 sun users 0 Mar 28 16:39 text.txt*

# clear bit x
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 0 Mar 28 16:39 text.txtshort summary:
on the 1st disk the bit is set and can no longer be removed
on 2nd behavior is predictable (set/reset as expected)

what is necessary: bring the behavior of the 1st disk to normal (like the 2nd disk)

thank all!!!

p.s.

test on virtual-box with begin
Code:main$ echo "text" > text.txt
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 5 Mar 28 19:40 text.txt
main$
main$ chmod -x text.txt
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 5 Mar 28 19:40 text.txt
main$
main$ chmod +x text.txt
main$ ls -l text.txt
-rwxrwxr-x 1 sun users 5 Mar 28 19:40 text.txt*
main$
main$ chmod -x text.txt
main$ ls -l text.txt
-rw-rw-r-- 1 sun users 5 Mar 28 19:40 text.txt
main$and getfacl

Code:#
# hd1
#
main$ getfacl NAS_SMB_HD1.txt
# file: NAS_SMB_HD1.txt
# owner: sun
# group: users
user::rw-
group::rw-
other::r--

main$ getfacl text.txt
# file: text.txt
# owner: sun
# group: users
user::rw-
group::rw-
other::---

#
# hd2
#
main$
main$ getfacl NAS_SMB_HD2.txt
# file: NAS_SMB_HD2.txt
# owner: sun
# group: users
user::rw-
group::rw-
other::r--

main$ getfacl text.txt
# file: text.txt
# owner: sun
# group: users
user::rw-
group::rw-
other::r--1st file - native
2nd file - created from scratch
What do we have in the bottom line?!
Code:other::---
#
other::r--what does this threaten us with?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments