Sponsored Content
Full Discussion: Reset file permissions
Top Forums UNIX for Dummies Questions & Answers Reset file permissions Post 302540151 by Corona688 on Tuesday 19th of July 2011 06:35:10 PM
Old 07-19-2011
I don't know of a command to rest any random file to default file permissions. The system doesn't keep a separate 'default' for each and every file you make. If you screwed up some system files and need to fix it, you're going to have to be more specific about what you did.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Take a file from the system and put on tape and reset the file to 0 bytes

:mad: I did this the other day but one of my support personnel removed my history so i could call it back up to remeber the exact command since i am air-headed at times. I am trying to take a 30 MEG file off the system and drop it to tape then i want to make the file go back to being 0 bytes so... (1 Reply)
Discussion started by: JackieRyan26
1 Replies

2. 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

3. UNIX for Dummies Questions & Answers

shadow file after a password reset

hi, I had to reset a lost root password by editing the /etc/passwd and /etc/shadow files ( this is a xen vm file, so i mounted and chrooted the file ) after the reboot with an empty password on root , i have set a new password with passwd but it only changed the /etc/passwd file.... (0 Replies)
Discussion started by: progressdll
0 Replies

4. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

5. Shell Programming and Scripting

Retain file permissions when saving .sh file from internet [OS X]

Hello. I have written a bash script that I am sharing with an OS X community I am a member of. The purpose of the script is to execute a series of commands for members without them having to get involved with Terminal, as it can be daunting for those with no experience of it at all. I have renamed... (4 Replies)
Discussion started by: baza210
4 Replies

6. 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

7. Shell Programming and Scripting

Reset different and multiple .txt file content to 0

I need help. I have to create a cron job that will reset the value of different and multiple .txt file to 0. Example: Actual 172_21.txt = 25 192_101.txt = 10 192_168.txt = 5 10_10.txt = 3 After the cron job 172_21.txt = 0 192_101.txt = 0 192_168.txt = 0 10_10.txt = 0 The cron... (2 Replies)
Discussion started by: jasperux
2 Replies

8. Shell Programming and Scripting

Changing file permissions of a file created by another user

Hi, I have used expdp for datapump. The .dmp file is created by the "oracle" user. my requirement is to make a zipped file of this .dmp file. What i am trying to do is change the permissions of this .dmp file from 0640 to 0644 and then do a gzip and zip it. Is there any way i can change... (3 Replies)
Discussion started by: qwertyu
3 Replies
Permissions(4)						     Kernel Interfaces Manual						    Permissions(4)

NAME
Permissions - Contains information about the permissions that remote computers have with respect to login, file access, and command execu- tion SYNOPSIS
/usr/lib/uucp/Permissions DESCRIPTION
The /usr/lib/uucp/Permissions file contains information about the ways in which the remote computers listed in the Systems file are allowed to carry out uucico and uuxqt transactions with a local system. Be aware that entries in a Permissions file do not affect a remote system user with a valid login on the local computer. Note that you must have root user authority to edit the Permissions file, which is owned by the uucp login ID. The Permissions file has two types of entries: LOGNAME specifies the permissions that take effect when a remote system logs in. These entries begin with LOGNAME. MACHINE specifies permissions that take effect when your system calls a remote system. These entries begin with MACHINE. Both type of entries consist of option-value pairs. You can have as many of these option-value pairs as you want and can write entries for all or only some of the remote sites. Options Specifies whether the remote system can request to set up file transfers from your system. The default is not to allow such requests. This option can be used in either LOGNAME or MACHINE entries. Specifies whether your system can send the work queued for the remote system when the remote system initiates the call. The default is call; that is, the queued files are sent only when the local system calls the remote system. This option is used in LOGNAME entries. Spec- ifies from which directories uucico can read. The default is the /usr/spool/uucppublic directory. This option can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specifies to which directories uucico can write. The default is the /usr/spool/uucpublic directory. This option can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specify exceptions to the READ and WRITE options. These options can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specifies the commands that a remote system can request to be executed on the local system. The default is rmail command. If multiple commands are specified, separate them with a colon(:). This option is used in MACHINE entries. Specifies whether any transactions can occur without the local system calling the remote system. The default is no, that is, the local system must initiate the call to the remote system before any transactions are allowed. If both the remote and local systems use CALLBACK, they will not be able to initiate any jobs. This option can be used in LOGNAME entries. Used to verify the calling system's identity. The values for this option should be the system name or the names of systems allowed to log in using the name specified by LOGNAME. If a system other than those specified in VALIDATE tries to use the name specified by LOGNAME, the connection will be refused. If multiple systems are specified, separate them with a colon (:). This option is used with the LOGNAME entries. Rules for Writing Permissions File Entries The following rules apply for writing Permissions file entries: Each option-value pair has the following format: option=value Blank spaces are not allowed before or after the equal sign. A blank space is used to separate option-value pairs. If an option has one or more values, the values are separated with a colon. Comment lines begin with a number sign (#) and end with a new line. The backslash () is used as a continuation character to continue a line on to the next line on the screen. Blank lines are ignored. All login IDs used by remote systems must appear in one and only one LOGNAME entry. If you do not want to grant permissions to each system by name, the entry MACHINE=OTHER will assign permissions to any system not mentioned by name. You can combine MACHINE and LOGNAME entries into a single entry if the options are the same. EXAMPLES
The following example allows remote system buck to log in with login ID Luucp1. The VALIDATE option means that the login ID uucp1 can only be used by remote system buck. The REQUEST option means that remote system buck can request files to be transferred from the local system. The SENDFILES option means that any requests queued on the local system for work on the remote system will be sent to the remote system during the current session if allowed by remote system buck. The READ and WRITE options mean that remote system can read and write from and to any directory that has proper permissions. LOGNAME=uucp1 REQUEST=yes SENDFILES=yes VALIDATE=buck READ=/ WRITE=/ MACHINE=buck REQUEST=yes COMMANDS=ALL READ=/ WRITE=/ The following example has all the default values of the options, which are as follows: REQUEST=no, SENDFILES=call READ and WRITE=/usr/spool/uucppublic COMMANDS=rmail CALLBACK=no The remote system cannot ask to receive any queued files containing work that users on the local system have requested to be exe- cuted on the remote system. The local system cannot send queued work to the remote system when that system has completed its current operations. Instead, the queued work can be sent only when the local system contacts the remote system. The remote system can send (write) files to and transfer (read) files from only the uucp public directory (/usr/spool/uucppublic/system_name) on the local sys- tem. Users on the remote system can execute only the default command (rmail) on the local system. LOGNAME=uucp2 MACHINE=buck:bigguy The following example is similar to the first. However, this entry allows the remote users of sys- tems waldo and buck to execute only the rmail and /usr/lbin/rnews commands: LOGNAME=uucp3 VALIDATE=waldo:buck REQUEST=yes SENDFILES=yes READ=/ WRITE=/ MACHINE=waldo:buck REQUEST=yes COM- MANDS=rmail:/usr/lbin/rnews READ=/ WRITE= The following example specifies that all remote systems using the uucp4 login ID that are not included in existing MACHINE entries can execute the rmail (mail) and /usr/bin/lint commands on the local system: LOGNAME=uucp4 MACHINE=OTHER COMMANDS=rmail:/usr/bin/lint The following example shows how the MACHINE and LOGNAME entry can be com- bined into one entry. The remote host is darla. The remote system darla should use the login ID xuucp to log in to local system. The rest of the options have the same meaning as explained in the first example. MACHINE=darla LOGNAME=xuucp READ=/ WRITE=/ REQUEST=yes SENDFILES=yes FILES
Contains all the configuration files for the UNIX-to-UNIX Copy Program (UUCP), including the Devices file. Describes accessible remote systems. RELATED INFORMATION
Files: Systems(4) delim off Permissions(4)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy