Sponsored Content
Full Discussion: VI command not working
Operating Systems AIX VI command not working Post 303010574 by ZekesGarage on Wednesday 3rd of January 2018 11:01:44 AM
Old 01-03-2018
Ok guys, I figured it out.
It was a global umask setting that got changed during an outage we had a couple weeks ago. Apparently one of the SAs changed the global umask to 0666 trying to fix an FTP permissions issue. So anyone who wasn't overriding that setting was getting all the permissions stripped from any new file being created.

I noticed that any new file that I touched had zero permissions, so any temp file created by VI wasn't able to read or write. So we've reset the global umask and everyone is good to go now.

I really appreciate the time and effort everyone put in.

Thanks!

Shawn
These 4 Users Gave Thanks to ZekesGarage For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

last command not working

I have a Solaris 8 Ultra 1 on my network that we use as a utility server. The last command, which looks in the /var/adm/wtmpx file, is not working. When I do a last, the latest entry is dated June 3, but the /var/adm/wtmpx file is dated whenever a login is successful (verified by typing a... (3 Replies)
Discussion started by: antalexi
3 Replies

2. Solaris

ls command not working

Hi, I have installed opensolaris 10 in VMware. Everything is fine except ls command is not working. It is not displaying any files and directories. Sorry if the question is soo trivial. (8 Replies)
Discussion started by: mayahari
8 Replies

3. Shell Programming and Scripting

cp command not working

Hi Guys, I have about 12000 files in a folder and I want to copy these to another folder. I am using the cp command to do this but it errors out saying cp -- argument list too long. Is there any way to get around this? I don't want to do a mv but use only cp. Thanks (9 Replies)
Discussion started by: npatwardhan
9 Replies

4. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

5. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

6. Shell Programming and Scripting

help with shell script: cp command not working, but mv command works...

Hello. I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct. We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies

7. Shell Programming and Scripting

Working of command

What does the command do lpr -Pqpr *.jpg do ? (1 Reply)
Discussion started by: Nabeel Nazir
1 Replies

8. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies

9. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
umask(1)                                                                                                                                  umask(1)

NAME
umask - get or set the file mode creation mask SYNOPSIS
/usr/bin/umask [-S] [mask] sh umask [ooo] csh umask [ooo] ksh umask [-S] [mask] The umask utility sets the file mode creation mask of the current shell execution environment to the value specified by the mask operand. This mask affects the initial value of the file permission bits of subsequently created files. If umask is called in a subshell or separate utility execution environment, such as one of the following: (umask 002) nohup umask ... find . -exec umask ... it does not affect the file mode creation mask of the caller's environment. For this reason, the /usr/bin/umask utility cannot be used to change the umask in an ongoing session. Its usefulness is limited to checking the caller's umask. To change the umask of an ongoing session you must use one of the shell builtins. If the mask operand is not specified, the umask utility writes the value of the invoking process's file mode creation mask to standard out- put. sh The user file-creation mode mask is set to ooo. The three octal digits refer to read/write/execute permissions for owner, group, and other, respectively (see chmod(1), chmod(2), and umask(2)). The value of each specified digit is subtracted from the corresponding ``digit'' spec- ified by the system for the creation of a file (see creat(2)). For example, umask 022 removes write permission for group and other. Files (and directories) normally created with mode 777 become mode 755. Files (and directories) created with mode 666 become mode 644). o If ooo is omitted, the current value of the mask is printed. o umask is recognized and executed by the shell. o umask can be included in the user's .profile (see profile(4)) and invoked at login to automatically set the user's permissions on files or directories created. csh See the description above for the Bourne shell (sh)umask built-in. ksh The user file-creation mask is set to mask. mask can either be an octal number or a symbolic value as described in chmod(1). If a symbolic value is given, the new umask value is the complement of the result of applying mask to the complement of the previous umask value. If mask is omitted, the current value of the mask is printed. The following option is supported: -S Produces symbolic output. The default output style is unspecified, but will be recognized on a subsequent invocation of umask on the same system as a mask operand to restore the previous file mode creation mask. The following operand is supported: mask A string specifying the new file mode creation mask. The string is treated in the same way as the mode operand described in the chmod(1) manual page. For a symbolic_mode value, the new value of the file mode creation mask is the logical complement of the file permission bits por- tion of the file mode specified by the symbolic_mode string. In a symbolic_mode value, the permissions op characters + and - are interpreted relative to the current file mode creation mask. + causes the bits for the indicated permissions to be cleared in the mask. - causes the bits of the indicated permissions to be set in the mask. The interpretation of mode values that specify file mode bits other than the file permission bits is unspecified. The file mode creation mask is set to the resulting numeric value. The default output of a prior invocation of umask on the same system with no operand will also be recognized as a mask operand. The use of an operand obtained in this way is not obsolescent, even if it is an octal number. OUTPUT
When the mask operand is not specified, the umask utility will write a message to standard output that can later be used as a umask mask operand. If -S is specified, the message will be in the following format: "u=%s,g=%s,o=%s ", owner permissions, group permissions, other permissions where the three values will be combinations of letters from the set {r, w, x}. The presence of a letter will indicate that the correspond- ing bit is clear in the file mode creation mask. If a mask operand is specified, there will be no output written to standard output. Example 1: Using the umask Command The examples in this section refer to the /usr/bin/umask utility and the ksh umask builtin. Either of the commands: umask a=rx,ug+w umask 002 sets the mode mask so that subsequently created files have their S_IWOTH bit cleared. After setting the mode mask with either of the above commands, the umask command can be used to write the current value of the mode mask: example$ umask 0002 The output format is unspecified, but historical implementations use the obsolescent octal integer mode format. example$ umask -S u=rwx,g=rwx,o=rx Either of these outputs can be used as the mask operand to a subsequent invocation of the umask utility. Assuming the mode mask is set as above, the command: umask g-w sets the mode mask so that subsequently created files have their S_IWGRP and S_IWOTH bits cleared. The command: umask --w sets the mode mask so that subsequently created files have all their write bits cleared. Notice that mask operands r, w, x, or anything beginning with a hyphen (-), must be preceded by - to keep it from being interpreted as an option. See environ(5) for descriptions of the following environment variables that affect the execution of umask: LANG, LC_ALL, LC_COL- LATELC_CTYPE, LC_MESSAGES, and NLSPATH. The following exit values are returned: 0 The file mode creation mask was successfully changed, or no mask operand was supplied. >0 An error occurred. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ chmod(1), csh(1), ksh(1), sh(1), chmod(2), creat(2), umask(2), profile(4), attributes(5), environ(5), standards(5) 23 Jun 2005 umask(1)
All times are GMT -4. The time now is 03:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy