To fix it I need to read the file's existing permission and re-apply the same permission to the file.
I'm completely lost on the point of this exercise and how it could fix anything. It could just be the ambiguous use of the phrase "the file". In your example one is a "link" and another is "special file" but none are "files".
Are there two computers involved here?
Can you give before and after examples and define the rules clearly.
Hi methyl,
I had problem while login in with any user add to the sys group. So I tried with the truss and got errors like below for truss of su - command. I looked in to the permission of the files and compared them with the other working server. It was correct, even then I reapplied the same permission then ran the truss for the su - command an found the error for /dev/null disappeared. So I wanted to do that for every single file that appeared in the truss output. Then found that execute permission for the group was missing for the mount points like /dev, /devices, /etc, /opt. This was that preventing su - to any user with sys in secondary group.
I used the code below and found several files were having permission 0745. And I changed them all to 755. Re-applying was insanity, so droped the idea and happened to find the real problem which prevented the su -
After fixing this I got so many file permission error in /var/adm/messages. I tried and fixed few of them but its never ending. This server is running for more than 700days, Now I have to reboot this server for a hardware maintenance and I'm scared that this server will have issue during the reboot.
So I want to do a comparison of all the files permission with another identical working server and change the different ones. I found a solaris audit tool bart to take snapshot of files permission with MD5, but this tool is not available in this server. So is there a work around to do this or any suggestions?
In the bash below I am asking the user for a panel and reading that into bed. Then asking the user for a file and reading that into file1.Is the grep in bold the correct way to apply the selected panel to the file? I am getting a syntax error. Thank you :)
... (4 Replies)
I have a .csv file and I want to md5 hash the second column for each row in the file.
File is something like
data1,foobar1,123,345
data2,foobar2,456,9393
data3,foobar3,1002,10109
Output would be like
data1,6c81243028f8e455fa617dd5f0232ce1,123,345... (3 Replies)
Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode.
For example, mode 644 ls -l should perform the command ls -l on all... (5 Replies)
HI there. My teacher asked us to write a code for this question
Write a Unix shell script named 'mode' that accepts two or more arguments, a file mode, a command and an optional list of parameters and performs the given command with the optional parameters on all files with that given mode. ... (1 Reply)
Hi All,
I would like to read the permission from a file and wanted to apply the same permission to another file.
say for example,
f1 755
first...i have to read the permission type (which is differ for each file) and need to apply the same for f2
a1 666
i have to get this... (5 Replies)
Dear members..
I have a fixed width file. Requirement is as below:-
1. Scan each record from this fixed width file
2. Check for value under field no "6" equals to "ABC". If yes, then filter this record into the output file
Please suggest a unix command to achieve this, my guess awk might... (6 Replies)
Hi Guys,
Can you tell me if unix permissions apply to sub dirs?
Dir is /home/ops/batch/files/all
/home is rwxrwxrwx
ops is rwxrwxrwx
batch is rwxr-wr-w
files is rwxrwxrwx
all is rwxrwxrwx
Having problems writing to all (does the userid nee to be the batch owner... (1 Reply)
I need to apply password protection to a xls file.I had looked at SpreadSheet::WriteExcel but problem being i dont want to write the contents of file again as the formatting the file would be a pain.
Is there way in which i write a entire file in one go , something like this
... (0 Replies)
Hello,
i need some help/advice on how to solve a particular problem.
these are the users:
|name | group |
---------- ---------------
|boss | department1 |
|assistant | department1 |
|employee | department1 |
|spy | department2 |
this is the... (0 Replies)
I just downloaded a updating make file to build Ethereal to .dll file, but I don't know how to update the old make file with this new one. Please help.. thnx a lot. (1 Reply)