Sponsored Content
Full Discussion: Password Protecting a File
Top Forums Shell Programming and Scripting Password Protecting a File Post 302494219 by ilikecows on Sunday 6th of February 2011 09:02:16 AM
Old 02-06-2011
Is there a reason why you cannot create a group, chgrp the file to the group, and put users who need to read the file in the group?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

password protecting a directory

I need to password protect a particular file on one of my websites. Is it possible to password protect the entire directory? Or can I only password protect one file. How do I do this? Does it have to do with the .HTACCESS file on my unix server? Please Help! ~ :confused: ~ (2 Replies)
Discussion started by: iriemember
2 Replies

2. Shell Programming and Scripting

Protecting script

Good day I would like to know if at all possible how to secure scripts. Assume ksh in AIx. Is there a way that I can avoid users from reading it other than chmod ? Thx J (2 Replies)
Discussion started by: jhansrod
2 Replies

3. Solaris

Password Protecting Directories...

Hi all, Just out of interest does anyone know how to password protect directories in Solaris? I have had a google search but just got a load of info about how to do it for webservers and apache, it needs to be Operating System level. Had a look on the Sun site as well but couldn't find... (1 Reply)
Discussion started by: B14speedfreak
1 Replies

4. UNIX for Dummies Questions & Answers

Protecting the directory tree

Hello, I am hoping someone maybe able to help me. I have set up an Apache web server on my sun server with user accounts in the main htdocs directory. My question is how to stop these users searching up the directory tree when they ftp/telnet to the server. Also is it possible to restrict the... (2 Replies)
Discussion started by: rooneyl
2 Replies

5. UNIX for Advanced & Expert Users

Protecting access to partition

I am trying to setup a computer where only the database can read/write to a partition. Basically, all other entities should fail. One thing I was thinking about was making the database own the partition itself (is this even possible?) but the problem is if someone can masquerade as the database... (4 Replies)
Discussion started by: Legend986
4 Replies

6. UNIX for Dummies Questions & Answers

Password protecting a directory

Hi, Is there a way to password protect a dir in linux ?? I need to protect the tmp folder of a JBoss server instance running on Linux RedHat os. I cannot change permissions cause, the root password is shared and a number of people login via that. also if possible can i restrict the root... (2 Replies)
Discussion started by: akshay61286
2 Replies

7. UNIX for Dummies Questions & Answers

password protect a CSV file: better solution than ZIP password?

Hi We send *.csv with sensitive data to our customers. Our customers open those files with Excel. A new requirement is that we password protect those CSV files. I thought to pack them with ZIP and assign a password to the archive. But Solaris 10 can't encrypt ZIP files. $ zip -P... (12 Replies)
Discussion started by: slashdotweenie
12 Replies

8. Shell Programming and Scripting

Password protecting a Excel file.

Hi, I want to make Excel files password protected present in my Unix directory. I have a application which will basically invoke a shell script with a parameter passed. The purpose of shell script would be to pop up a box to enter password. This password will be validated against database entry... (1 Reply)
Discussion started by: anil029
1 Replies

9. AIX

Protecting backup with password

Hello AIX experts, How can I protect my backups using password? I'm waiting any solution. Thanks (2 Replies)
Discussion started by: Mohannad
2 Replies

10. Shell Programming and Scripting

Password Protecting a File

Hi Guys, I am generating a csv file using a shell script in Unix. Please can you guys advise if I can also password protect the file. Best Regards, Shaz (5 Replies)
Discussion started by: Shazin
5 Replies
chgrp(1)							   User Commands							  chgrp(1)

NAME
chgrp - change file group ownership SYNOPSIS
chgrp [-fhR] group file... chgrp -R [f] [-H | -L | -P] group file... DESCRIPTION
The chgrp utility will set the group ID of the file named by each file operand to the group ID specified by the group operand. For each file operand, it will perform actions equivalent to the chown(2) function, called with the following arguments: o The file operand will be used as the path argument. o The user ID of the file will be used as the owner argument. o The specified group ID will be used as the group argument. Unless chgrp is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a regular file will be cleared upon successful completion; the set-user-ID and set-group-ID bits of other file types may be cleared. The operating system has a configuration option _POSIX_CHOWN_RESTRICTED, to restrict ownership changes. When this option is in effect, the owner of the file may change the group of the file only to a group to which the owner belongs. Only the super-user can arbitrarily change owner IDs, whether or not this option is in effect. To set this configuration option, include the following line in /etc/system: set rstchown = 1 To disable this option, include the following line in /etc/system: set rstchown = 0 _POSIX_CHOWN_RESTRICTED is enabled by default. See system(4) and fpathconf(2). OPTIONS
The following options are supported. /usr/bin/chgrp and /usr/xpg4/bin/chgrp -f Force. Does not report errors. -h If the file is a symbolic link, this option changes the group of the symbolic link. Without this option, the group of the file referenced by the symbolic link is changed. -H If the file specified on the command line is a symbolic link referencing a file of type directory, this option changes the group of the directory referenced by the symbolic link and all the files in the file hierarchy below it. If a symbolic link is encoun- tered when traversing a file hierarchy, the group of the target file is changed, but no recursion takes place. -L If the file is a symbolic link, this option changes the group of the file referenced by the symbolic link. If the file specified on the command line, or encountered during the traversal of the file hierarchy, is a symbolic link referencing a file of type directory, then this option changes the group of the directory referenced by the symbolic link and all files in the file hierarchy below it. -P If the file specified on the command line or encountered during the traversal of a file hierarchy is a symbolic link, this option changes the group of the symbolic link. This option does not follow the symbolic link to any other part of the file hierarchy. Specifying more than one of the mutually-exclusive options -H, -L, or -P is not considered an error. The last option specified determines the behavior of chgrp. /usr/bin/chgrp -R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed, unless the -h or -P option is specified. However, no recur- sion takes place, unless the -H or -L option is specified. /usr/xpg4/bin/chgrp -R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed, unless the -h or -P option is specified. Unless the -H, -L, or -P option is specified, the -L option is used as the default mode. OPERANDS
The following operands are supported: group A group name from the group database or a numeric group ID. Either specifies a group ID to be given to each file named by one of the file operands. If a numeric group operand exists in the group database as a group name, the group ID number associated with that group name is used as the group ID. file A path name of a file whose group ID is to be modified. USAGE
See largefile(5) for the description of the behavior of chgrp when encountering files greater than or equal to 2 Gbyte (2**31 bytes). ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of chgrp: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 The utility executed successfully and all requested changes were made. >0 An error occurred. FILES
/etc/group group file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/bin/chgrp +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled (see NOTES) | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ /usr/xpg4/bin/chgrp +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |CSI |Enabled (see NOTES) | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
chmod(1), chown(1), id(1M), chown(2), fpathconf(2), group(4), passwd(4), system(4), attributes(5), environ(5), largefile(5), standards(5) NOTES
chgrp is CSI-enabled except for the group name. SunOS 5.10 25 Nov 2003 chgrp(1)
All times are GMT -4. The time now is 11:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy