Sponsored Content
Top Forums UNIX for Advanced & Expert Users Keeping your Home file permissions correct Post 302549101 by bakunin on Sunday 21st of August 2011 01:09:45 PM
Old 08-21-2011
Quote:
Originally Posted by antofthy
The problems I have with my current method is that while I can set exceptions, for specific files (such as for the home directory itself as above). I can't do it generally.

That is I can make an exception for say "bin/file.dat" (a data file in a directly predominantly executables) I can't make it general "bin/*.dat" or recursivally general "bin/**/*.dat"
This is basically a matter of correct parsing of the configuration file. I suppose you can probably solve most problems by applying the following algorithm:

First sort all entries in the configuration by "length" - that is: by the number of subdirectory levels they contain. Then, within the levels, sort the entries simply alphabetically. Apply now the rules to every file from top down.

This way you will automatically apply all the exceptions correctly, because the "shorter" rules for a specific path will be applied before the longer ones. You can have every number of exceptions this way.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reset Home Directory Permissions

I accidently reset the permissions of my /home/punkrockguy318 directory to root only. How can I get my punkrockguy318 permissions ( and all of it's contents) to be read/write accesable only to punkrockguy318 and root? (5 Replies)
Discussion started by: punkrockguy318
5 Replies

2. UNIX for Dummies Questions & Answers

Can I prevent a user from changing the permissions on their home directory.

Hello All, I have a new HPUX system going into production and it will be used by 2 projects. One of the contract requirements is the 2 groups can not have access to the others work or data. I believe I have the system pretty well locked up using groups and permissions and selective mounting of... (2 Replies)
Discussion started by: DanL
2 Replies

3. UNIX for Dummies Questions & Answers

User home folder permissions catch-22, help!

Hi everyone. My objective is to configure a Solaris 10 box as follows: There will be many simultaneous users connecting to it, and each of those users would automatically get a home folder. For example, when I add user "Bob", the home folder would be /export/home/Bob And for Mary, it's... (3 Replies)
Discussion started by: EugeneG
3 Replies

4. UNIX for Advanced & Expert Users

Home Directory Permissions

My users home directory located in a RHEL 5.0 nfs server. Client is ubuntu 8.1 using NIS for authntication anf NFS for automounting home Directory on the client side. I set 700 to the users home directory. My problem here is some of the users change the mode, which result in leak of... (2 Replies)
Discussion started by: a_artha
2 Replies

5. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

6. Shell Programming and Scripting

Help with file editing while keeping file format intact

Hi, I am having a file which is fix length and comma seperated. And I want to replace values for one column. I am reading file line by line in variable $LINE and then replacing the string. Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Discussion started by: Mruda
8 Replies

7. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

8. UNIX for Advanced & Expert Users

Permissions on a directory in /home for all users

Hi, I have created a shared directory on /home, where all users on a certain group have read, write and execute permissions. I did this using chmod -R g+rwx /home/shared/ The problem is, when a particular user creates a directory within /home/shared, other users are not able to write to... (8 Replies)
Discussion started by: lost.identity
8 Replies

9. Shell Programming and Scripting

Keeping record of file 2 based on a reference file 1 in awk

I have 2 input files (tab separated): file1: make_A 1990 foo bar make_B 2010 this that make_C 2004 these those file2: make_X 1970 1995 ref_1:43 ref_2:65 make_A 1970 1995 ref_1:4 ref_2:21 ref_3:18 make_A 1980 2002 ref_1:7 ref_2:7 ref_3:0 ... (2 Replies)
Discussion started by: beca123456
2 Replies

10. Shell Programming and Scripting

Linux correct permissions for .bash_aliases

Above is a search string I tried on Google that produced lots of hits but not much in the way of clues. And I wasn't looking for clues. So I decided, for the first time, to ask the question here. What are the correct permissions for the .bash_aliases file? iwrong (1 Reply)
Discussion started by: iamwrong
1 Replies
Perl::Critic::Exception::AggregateConfiguration(3pm)	User Contributed Perl Documentation   Perl::Critic::Exception::AggregateConfiguration(3pm)

NAME
Perl::Critic::Exception::AggregateConfiguration - A collection of a set of problems found in the configuration and/or command-line options. DESCRIPTION
A set of configuration settings can have multiple problems. This is an object for collecting all the problems found so that the user can see them in one run. INTERFACE SUPPORT
This is considered to be a public class. Any changes to its interface will go through a deprecation cycle. METHODS
"add_exception( $exception )" Accumulate the parameter with rest of the exceptions. "add_exceptions_from( $aggregate )" Accumulate the exceptions from another instance of this class. "exceptions()" Returns a reference to an array of the collected exceptions. "add_exception_or_rethrow( $eval_error )" If the parameter is an instance of Perl::Critic::Exception::Configuration or Perl::Critic::Exception::AggregateConfiguration, add it. Otherwise, "die" with the parameter, if it is a reference, or "confess" with it. If the parameter is false, simply returns. "has_exceptions()" Answer whether any configuration problems have been found. "full_message()" Concatenate the exception messages. See "full_message" in Exception::Class. AUTHOR
Elliot Shank <perl@galumph.com> COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Exception::AggregateConfiguration(3pm)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy