Hi Everyone,

        In Linux as a root i need to create a user account with 700 permissions as its home directory permissions, so that user after logging in should not be able to change his/her home directory permissions , he/she should be can change other files/directories inside home directory.
        So Please tell me is there any way i could create a user like this.

        Thanks in Advance 

Thanks
Srikanth M.

You can set that to be the default umask and all new users would have it set or use chmod.

Hi lucaciandrew & here2serve

I Know how to create a user with 700 permissions, what i exactly need is after creating the login the user logins and he can change the permissions of his/her home directory to anything like from 700 to 777. So he/she should not able to change his permissions for the home directory only root can change his home directory permissions , inside to user home directory he can change other files/directories as he/she wishes.
Thanks
Srikanth M.

Hello,

What you are asking for is really mutually exclusive. In order for the user to be able to write files and create directories i their home directory they must have write permissions to the directory. What you are saying is "I want the user to be able to write to their directory but not be able to write to their directory." and you can't have it both ways. Like every other switch or bit in a computer it is either on or off not both.

Sorry.

hello msrikanth,
is that user just gonna read files and stuff yeah? maybe setting the octals to 444
or use chown, hope it helps.

hello msrikanth,
is that user just gonna read files and stuff yeah? maybe setting the octals to 444
or use chown, hope it helps.

Hi rch1231,
I didn't understand what you are trying to say by mutually exclusive all i want is as a root i will some users with 700 as their home directory permissions and allot to them , so those users will login with their login name and given password after that they can change their home directory permissions from 700 to 755 (or) 777 allowing other users to have a change for copying files and i want to prevent that by disabling the user from changing his/her home directory permissions ie as
 I Want to disable (or) should not effect when user tries to use command as 
              1) chmod 755 ~ (or) chmod 744 ~ (or) chmod 777 ~ (except chmod 700 ~)
              2) chmod 755 /home/user1 (or) chmod 744 /home/user1 (or) chmod 777 /home/user1 (except chmod 700 /home/user1)
              Hope this is clear and it is what i exactly want

 Thanks
 Srikanth M.

Just read your response. The only way I can see to do that would be to add another directory level to the picture. For example: create /home/useratop/usera and make it thier home directory. Set the permissions on /home/useratop to r-x------ or 500 owned by them . The other users will not be able to get past the first directory level to see the sub dir and then permissions on /home/useratop/usera to 755 they will not be able to give permissions to get to their new home. Make sure to make their home directory in /etc/passwd is set to /home/useratop/usera to set the value for ~

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.