Operating System - HP-UX
1748230 Members
4337 Online
108759 Solutions
New Discussion юеВ

Re: passwd setting for a directory.

 
SOLVED
Go to solution
fizan
Super Advisor

passwd setting for a directory.

how to set password for a particular directory?
8 REPLIES 8
Torsten.
Acclaimed Contributor

Re: passwd setting for a directory.

How should this work?

I think you need another solution for your problem. Maybe it helps to tell why you want to do this.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
fizan
Super Advisor

Re: passwd setting for a directory.

in windows admins use to protect a folder by passwd protecting, so like that in unix any command avail?
James R. Ferguson
Acclaimed Contributor
Solution

Re: passwd setting for a directory.

Hi:

> in windows admins use to protect a folder by passwd protecting, so like that in unix any command avail?

The closest analog I can think of is to set the sticky bit on a directory. This means that only the owner of a file can delete (remove) his/ner file from the directory, regardless of the directory's write permissions settings. To set the sticky bit you would do (either):

# chmod 1777 mydir
# chmod +t mydir

Regards!

...JRF...
fizan
Super Advisor

Re: passwd setting for a directory.

so apart from sticky bit setting, no option for password setting for a directory right,

one of our linux professional, says that a directory can password protected, so just for clarification i have asked in itrc.

thanks
james!!

Re: passwd setting for a directory.

not a directory, but you can protect a whole filesystem using EVFS:

http://docs.hp.com/en/internet.html#Encrypted%20Volume%20and%20File%20System%20%28EVFS%29

If this is what you are looking for - if you don't have the encryption key (password) you can't get at the data on the filesystem...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
dirk dierickx
Honored Contributor

Re: passwd setting for a directory.

you can encrypt, it's not the same as password protection. i think it's also a solution in search for a problem.

using normal rights you can do much the same, without the need for passwords.
Raj D.
Honored Contributor

Re: passwd setting for a directory.

fizan,
Passwor protection to a folder/directory is applicable for windows , for unix the final permission depened on user/group and file permission settings.

Silmilar question raised earlier related to unix folder permission: however there is no way setting password to unix directories in unix other than file level secrity or restricting access:
check out: http://snipplr.com/view/3791/password-protect-folder--directory-with-htaccess-and-htpasswd-on-apache-and-linux--unix/



If you are accessing unix filesystems/directories from windows (Samba) , that can be made password protected as per samba/cifs configuration.



Also restricted sheel can be use to restrict user access.

Ex:
$ pwd
/home/john

$ cd /
rsh: cd: The operation is not allowed in a restricted shell.

$ more /etc/passwd
rsh: more: not found.

http://newfdawg.com/SHP-RestShell.htm


Hth,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: passwd setting for a directory.

fizan,

Found one Similar question:
>> how can i password protect a folder (directory)in unix :

http://www.computing.net/answers/unix/how-can-i-password-protect-a-folder-directoryin-unix/577.html


Managing with unix file permission, or delegating access with sudo , powerbroker tools are the best way controlling access.


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "