Sponsored Content
Full Discussion: File and Dir permissions
Top Forums UNIX for Dummies Questions & Answers File and Dir permissions Post 19675 by Kelam_Magnus on Monday 15th of April 2002 12:38:42 PM
Old 04-15-2002
Re: File and Dir permissions

Quote:
Originally posted by thomas.jones
I would like to configure my SuSE 7.0 workstation more securely. I have attempted for about two weeks to find a guideline on good practices for the file and directory permissions.........but to no avail.

I am not sure that such guidelines exist. Other than what are specified already by the UNIX standard for the version of UNIX that you are using. I think your real question is about security. Correct?

What are you trying to accomplish with this? UNIX is by definition fairly secure, but only depending on the honesty of the users on your box.

If you are attempting to "lock down" your box, that will be very hard to do. Permissions must remain the way they are as defaulted during the install process. If you try to lock down the box too much, your OS will have problems or your users will not be able do work on the box.

Give a few examples of what you are trying to do.

Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

copying a file from one dir to another dir

hi i have a script compareFiles() { find /tmp/Satya -type f | \ while read filename1 do echo "----------------------------------------$filename1" find /tmp/Satya -type f | \ while read filename2 do if diff $filename1 $filename2 then echo "Both files... (3 Replies)
Discussion started by: Satyak
3 Replies

2. Shell Programming and Scripting

Shell Script to save/restore files and dir permissions

Hello all: I need found script to save and restore file permissions and owner:group... this is for backup my server... I have one problem in my server and file permissions and owner:group, mess up.. For this reason i need found one way to secure this aspect of the server... Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies

3. Shell Programming and Scripting

Moving file(s) from dir to dir

Hi, I am fairly new to writing scripts. I am trying to write a script that moves either One or All of the files from one directory to another. I know how to make the actual command to do it, but i don't quite know how to add operators to it, ie -i or -a. I want -i to move one file from... (4 Replies)
Discussion started by: SirJoeh
4 Replies

4. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

5. UNIX for Dummies Questions & Answers

Creating a File system with required permissions for all DIR's created in

Hello All, I am application admin. I need to clear all the temporary files cleared by the applications. I need help/suggestion that is there any way to create a file system such that every Dir created in by any user will have 775 permissions. So, that i can simply clear the temporary file which... (6 Replies)
Discussion started by: firestar
6 Replies

6. Shell Programming and Scripting

Dir permissions

Hi All, I have a script which will be run by another user say user 2 which will create a new dir say dir 4 in my work place and copy certains files from his dir. /t1/t2/t3/dir4 I want to allow the user to create the dir dir4 and copy the files,but bring the control back to my name say user... (2 Replies)
Discussion started by: prasperl
2 Replies

7. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

8. Shell Programming and Scripting

Have files take on DIR permissions

Hello all; I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account: 1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies

9. Shell Programming and Scripting

Create file Dir and Sub Dir same time

Hi Guys , I want create files Dire and Sub Dire. as same time using variable. EX: x1="/hk/Pt/put/NC/R1.txt" x2="/hk/pt/Put/Ot/NC/RN.txt" And i want delete all after done with my script. Thanks (2 Replies)
Discussion started by: pareshkp
2 Replies

10. Shell Programming and Scripting

Help- writing to dir with no write permissions (script)

hello, I have a question regarding the below script.. I just simply trying to write to a file in directory that does not have write permissions but this is failing .. it still writes to it regardless .. Many thanks in advance.. #!/bin/bash #check if dir exists, if so write to it ... (5 Replies)
Discussion started by: Reb0rn
5 Replies
IO::Dir(3pm)						 Perl Programmers Reference Guide					      IO::Dir(3pm)

NAME
IO::Dir - supply object methods for directory handles SYNOPSIS
use IO::Dir; $d = IO::Dir->new("."); if (defined $d) { while (defined($_ = $d->read)) { something($_); } $d->rewind; while (defined($_ = $d->read)) { something_else($_); } undef $d; } tie %dir, 'IO::Dir', "."; foreach (keys %dir) { print $_, " " , $dir{$_}->size," "; } DESCRIPTION
The "IO::Dir" package provides two interfaces to perl's directory reading routines. The first interface is an object approach. "IO::Dir" provides an object constructor and methods, which are just wrappers around perl's built in directory reading routines. new ( [ DIRNAME ] ) "new" is the constructor for "IO::Dir" objects. It accepts one optional argument which, if given, "new" will pass to "open" The following methods are wrappers for the directory related functions built into perl (the trailing 'dir' has been removed from the names). See perlfunc for details of these functions. open ( DIRNAME ) read () seek ( POS ) tell () rewind () close () "IO::Dir" also provides an interface to reading directories via a tied hash. The tied hash extends the interface beyond just the directory reading routines by the use of "lstat", from the "File::stat" package, "unlink", "rmdir" and "utime". tie %hash, 'IO::Dir', DIRNAME [, OPTIONS ] The keys of the hash will be the names of the entries in the directory. Reading a value from the hash will be the result of calling "File::stat::lstat". Deleting an element from the hash will delete the corresponding file or subdirectory, provided that "DIR_UNLINK" is included in the "OPTIONS". Assigning to an entry in the hash will cause the time stamps of the file to be modified. If the file does not exist then it will be created. Assigning a single integer to a hash element will cause both the access and modification times to be changed to that value. Alternatively a reference to an array of two values can be passed. The first array element will be used to set the access time and the second element will be used to set the modification time. SEE ALSO
File::stat AUTHOR
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perlbug@perl.org>. COPYRIGHT
Copyright (c) 1997-2003 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 IO::Dir(3pm)
All times are GMT -4. The time now is 02:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy