Welcome to UNIX forums, good that you are showing us your effort/code sample; but mentioning 1 liner in title will NOT help people to help you.
So kindly update your post with complete details about your complete ask. Wherever applicable try to post samples of input and expected output too.
Assuming that you mean that you want to terminate this code by returning $FATAL if one or more of the files mentioned in your if statement tests are not both readable and writeable, you probably want to change:
to something more like:
Note, also, that none of the variables this script is using have been defined by anything you have shown us. If they aren't defined before they are used, the chances of any of this working are pretty small.
I have built a website and I can access and edit the website'files on server via the root user. The current file and directory structures are not changeable. Now I am hiring a webpage designer to help me re-design some pages, I am going to let the designer edit the files directly on the server. So... (5 Replies)
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Hi
I am trying to make a web program which is command line equivalent. i have done the coding in cgi program in perl and html for basic forms to take inputs. when i ran the program from web application i see permission denied messages. after analyzing i found apache is running as wwwrun which... (2 Replies)
hi all:
as we know , when usb flash disk plug in and aotu mounted , the default permission of the usb flash disk is 700. that means others have no permission . the question: how to make others have read/write permission when the aotu mounted usb flash disk pluge in ? thanks !! (0 Replies)
I want to check access rights permissions not for 'user', not for 'group', but for 'others'.
I want to do it by system command in which i want to use 'ls -l' and 'awk' command.
I have written the following program :
#!/usr/bin/local/perl
#include <stdlib.h>
system ("ls -l | awk... (1 Reply)
Hi,
The requirement is like,
the program needs 2 argument one is user_id and second one is directory path. My script will check if that user_id has write access to the directory path. The directory path may be in any file system like AFS or NFS.
Can any one please suggest some points to... (1 Reply)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)