07-19-2011
Reset file permissions
Hi,
Is there a command I can execute to reset to default the file permissions of some files and directories?
I am using BASH on a system running OS X.
Thanks a lot,
Mike
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
: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
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
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
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
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
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
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
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
LEARN ABOUT OSX
mount_hfs
MOUNT_HFS(8) BSD System Manager's Manual MOUNT_HFS(8)
NAME
mount_hfs -- mount an HFS/HFS+ file system
SYNOPSIS
mount_hfs [-e encoding] [-u user] [-g group] [-m mask] [-o options] [-j] [-w] [-x] special directory
DESCRIPTION
The mount_hfs command attaches the HFS file system residing on the device special to the global file system namespace at the location indi-
cated by directory. This command is normally executed by mount(8) at boot time.
The options are as follows:
-e encoding (standard HFS volumes only)
Specify the Macintosh encoding. The following encodings are supported:
Arabic, ChineseSimp, ChineseTrad, Croatian, Cyrillic, Greek, Hebrew, Icelandic, Japanese, Korean, Roman (default), Romanian, Thai,
Turkish
-u user
Set the owner of the files in the file system to user. The default owner is the owner of the directory on which the file system is
being mounted. The user may be a user-name, or a numeric value.
-g group
Set the group of the files in the file system to group. The default group is the group of the directory on which the file system is
being mounted. The group may be a group-name, or a numeric value.
-m mask
Specify the maximum file permissions for files in the file system. (For example, a mask of 755 specifies that, by default, the owner
should have read, write, and execute permissions for files, but others should only have read and execute permissions. See chmod(1)
for more information about octal file modes.) Only the nine low-order bits of mask are used. The default mask is taken from the
directory on which the file system is being mounted.
-o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options
and their meanings.
-j Ignore the journal for this mount.
-w Mount the HFS wrapper volume.
-x Disable execute permissions on a standard HFS file system.
SEE ALSO
mount(2), unmount(2), fstab(5), mount(8)
BUGS
Some HFS file systems with highly fragmented catalog files may not mount.
HISTORY
The mount_hfs utility first appeared in Mac OS X Server 1.0.
Mac OS X March 14, 2001 Mac OS X