NFS different permissions to subdirectories [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have the following /etc/exports config for my NFS server.
/root/share *(rw,fsid=0,no_root_squash)
/root/share/music anne(rw,no_root_squash) alex(rw,no_root_squash)
/root/share/video anne(rw,no_root_squash) alex(ro,no_root_squash)
I want anne to have rw access to both directories. I want alex to have only ro access to /root/share/video. The problem with my current config is that they both have rw access.
If I change the first line to
/root/share *(ro,fsid=0,no_root_squash)
It overwrites every other line and makes all directories read-only.
How can I make the first line take effect only on /root/share ?
Thank you.

You are very confused about what constitutes an exported filesystem. /etc/exports does not contain an Access Control List - not really. It contains a list of independent filesystems and how they should be exported.
Each entry is completely separate from each other and the export name matching is exact, not recursive - if alex mounts /root/share only the first entry will be used. In the same vein, alex cannot mount /root/share/misc directly because it is not an exported directory.

Related

Read Access in Linux File System. rwx---r-- [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Consider a file with the following permissions:
rwx---r--
I am not the owner of this file, but I am a member of the group of this file.
My question is: do I have read access to this file?
I thought the answer was YES, since the world has read access to this file. But, a sysadmin is telling me that the answer is NO, since the group access bits are all off.
Can someone provide an authoritative answer?
drwxrwxr-x
Position 1 says whether it is a directory or a normal file. d for directory and - for normal file
Positions 2,3 and 4 stands for read, write, execute permissions for user of the file.
Positions 5,6 and 7 stands for read, write, execute permissions for group.
Positions 8,9 and 10 stand for read, write, exeucte permissions for the owner of the file.
So for rwx---r--, group has no permissions as group bits are turned off.

Linux put permissions good [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
What I would like to is create a directory that belongs to a group and each of those member can create, edit & remove files.
chgrp OldGroup NewGroup
chmod g=rwx
That's what I learned, but now my big problem is that I need to make sure people from that group can only delete their own files.
I am not sure how to put these rights,
if you have any ideas, please share them!
Thnx for reading.
did you try setting sticky bit?
chmod 1775 /directory/with/group/files
when the sticky bit is enabled on a directory, users (other than the owner) can only remove their own files inside a directory. This is used on directories like /tmp whose permissions are 1777=rwxrwxrwt

What is up with Linux and Apache's ".d"? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Linux and Apache suffix a bunch of files and folders with d or .d.
init.d
rc.d
/etc/httpd/conf.d
/etc/httpd/vhost.d
What is the meaning of this convention?
It means simply "directory" and commonly indicates that either a single file, or a directory full of them is acceptable for configuration.
(In the case of rc.d, that replaces the old-style Unix /etc/rc script which is no longer used on Linux.)
Means "a directory", containing a bunch of files intended for the same goal (init scripts in init.d, configuration files in conf.d, etc.) - this tendency seems to have expanded onto separate files, too.

Use of /etc/passwd-, /etc/shadow-, /etc/group- [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In addition to the files : /etc/group, /etc/passwd and /etc/shadow, I could see three files in my linux machine.
/etc/group-
/etc/passwd-
/etc/shadow-
I cannot see these files in my root filesystem. But when I try to add one user using useradd command, these files seem to get generated.
So i would like to know when exactly is these files created and what is the use of these files?
These are backups of previous versions.
Manual pages show these files and states:
/etc/passwd-
Backup file for /etc/passwd.
/etc/shadow-
Backup file for /etc/shadow.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.
See http://manpages.ubuntu.com/manpages/oneiric/man5/shadow.5.html and http://manpages.ubuntu.com/manpages/oneiric/man5/passwd.5.html

hardlinks in Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What is the size of the hardlink in Linux? Will it be the size of the inode? If I have two of them?
Thanks in advnace for any explanation, I tried to google it, but didn't find anything
A hard link reuses the inode, but requires a separate directory entry, which takes up 8 bytes plus the length of the file name in ext2. There may be other costs associated, such as when directory indexing is used, also, directories grow by entire blocks.
Think of a hard link as just another name for a file. If a file has 1000 hard links, that just means that it has 1000 different directory entries associated with it, all with potentially different names. For example, if you had 1000 different names, you would still only be one person. You'd take up the same amount of space no matter how many names you had. You'd just have a bit more paperwork for each additional name.

Resources