Sponsored Content
Full Discussion: File permisson doesn't work
Top Forums Shell Programming and Scripting File permisson doesn't work Post 302776843 by busyboy on Thursday 7th of March 2013 03:44:07 AM
Old 03-07-2013
Code:
if test -r astropubkey.asc ; then echo "file has r perms"; else echo "file is no r perms"; fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. UNIX for Dummies Questions & Answers

my make doesn't work

hi I wrote the following makefile, I have just one problem, when i type make clean I get the message make 'clean' is up to date and any obj file is removed from my folder, what's wrong? Thank you CC = cc all: es.o elaboration.o $(CC) -o es es.o elaboration.o elaboration.o:... (0 Replies)
Discussion started by: Puntino
0 Replies

4. Shell Programming and Scripting

alias doesn't work

Hi I have put alias ll='ls -la' in .profile file but it doesn't work. On hand it works it looks like the .profile file is not beeing read. How to check whitch file is loaded? ,profile? .bash_profile? My system: SunOS mion 5.10 Generic Shell: /bin/pfksh Thanks (2 Replies)
Discussion started by: miojamo
2 Replies

5. Solaris

shutdown -y -i5 -g0 DOESN'T work

hello, The command above seems not working on my solaris 8/9 sparc machines. a. resulted to the ff below when I instead use "shutdown" only. Broadcast Message from root (pts/1) on "hostname" date.. The system "hostname" will be shut down in 30 seconds THE SYSTEM bdosg IS BEING SHUT... (4 Replies)
Discussion started by: lhareigh890
4 Replies

6. Shell Programming and Scripting

directory structure & file permisson comparison

Hi - I want to compare permissions of the directory structure and files beneath it with permissions one week back on same directory structure and files beneath it. if any changes to permissions of any file or directory permissions send an email. I am not sure how to list the permissions of all... (1 Reply)
Discussion started by: oraclermanpt
1 Replies

7. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

8. Shell Programming and Scripting

Ssh remote command doesn't work from script file

I have 10 application servers in a distributed architecture generating their own application logs. Each server has application utility to continuously tail the log. for example following command follows tails and follows new logfiles as they are generated server1$ logutility logtype When I run... (8 Replies)
Discussion started by: indianya
8 Replies

9. Shell Programming and Scripting

FTP xlsx file doesn't work ...contains wierd characters.

Guys, I've a xlsx file containing pivot tables and my job is to FTP it from one Linux terminal to another. I use the script below : ftp -in xxxx > /ftp.log 2>&1 <<EOT user xxx yyyy binary cd <directory> put xxx.xlsx `basename xxx.xlsx` bye EOT After the file is received in the FTP... (2 Replies)
Discussion started by: bhagat.singh-j
2 Replies

10. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
avc_add_callback(3)					     SELinux API documentation					       avc_add_callback(3)

NAME
avc_add_callback - additional event notification for SELinux userspace object managers SYNOPSIS
#include <selinux/selinux.h> #include <selinux/avc.h> int avc_add_callback(int (*callback)(uint32_t event, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, access_vector_t *out_retained), uint32_t events, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms); DESCRIPTION
avc_add_callback() is used to register callback functions on security events. The purpose of this functionality is to allow userspace object managers to take additional action when a policy change, usually a policy reload, causes permissions to be granted or revoked. events is the bitwise-or of security events on which to register the callback; see SECURITY EVENTS below. ssid, tsid, tclass, and perms specify the source and target SID's, target class, and specific permissions that the callback wishes to moni- tor. The special symbol SECSID_WILD may be passed as the source or target and will cause any SID to match. callback is the callback function provided by the userspace object manager. The event argument indicates the security event which occured; the remaining arguments are interpreted according to the event as described below. The return value of the callback should be zero on suc- cess, -1 on error with errno set appropriately (but see RETURN VALUE below). SECURITY EVENTS
In all cases below, ssid and/or tsid may be set to SECSID_WILD, indicating that the change applies to all source and/or target SID's. Unless otherwise indicated, the out_retained parameter is unused. AVC_CALLBACK_GRANT Previously denied permissions are now granted for ssid, tsid with respect to tclass. perms indicates the permissions to grant. AVC_CALLBACK_TRY_REVOKE Previously granted permissions are now conditionally revoked for ssid, tsid with respect to tclass. perms indicates the permissions to revoke. The callback should set out_retained to the subset of perms which are retained as migrated permissions. Note that out_retained is ignored if the callback returns -1. AVC_CALLBACK_REVOKE Previously granted permissions are now unconditionally revoked for ssid, tsid with respect to tclass. perms indicates the permis- sions to revoke. AVC_CALLBACK_RESET Indicates that the cache was flushed. The SID, class, and permission arguments are unused and are set to NULL. AVC_CALLBACK_AUDITALLOW_ENABLE The permissions given by perms should now be audited when granted for ssid, tsid with respect to tclass. AVC_CALLBACK_AUDITALLOW_DISABLE The permissions given by perms should no longer be audited when granted for ssid, tsid with respect to tclass. AVC_CALLBACK_AUDITDENY_ENABLE The permissions given by perms should now be audited when denied for ssid, tsid with respect to tclass. AVC_CALLBACK_AUDITDENY_DISABLE The permissions given by perms should no longer be audited when denied for ssid, tsid with respect to tclass. RETURN VALUE
On success, avc_add_callback() returns zero. On error, -1 is returned and errno is set appropriately. A return value of -1 from a callback is interpreted as a failed policy operation. If such a return value is encountered, all remaining callbacks registered on the event are called. In threaded mode, the netlink handler thread may then terminate and cause the userspace AVC to return EINVAL on all further permission checks until avc_destroy(3) is called. In non-threaded mode, the permission check on which the error occurred will return -1 and the value of errno encountered to the caller. In both cases, a log message is produced and the kernel may be notified of the error. ERRORS
ENOMEM An attempt to allocate memory failed. NOTES
If the userspace AVC is running in threaded mode, callbacks registered via avc_add_callback() may be executed in the context of the netlink handler thread. This will likely introduce synchronization issues requiring the use of locks. See avc_init(3). Support for dynamic revocation and retained permissions is mostly unimplemented in the SELinux kernel module. The only security event that currently gets excercised is AVC_CALLBACK_RESET. AUTHOR
Eamon Walsh <ewalsh@tycho.nsa.gov> SEE ALSO
avc_init(3), avc_has_perm(3), avc_context_to_sid(3), avc_cache_stats(3), security_compute_av(3) selinux(8) 9 June 2004 avc_add_callback(3)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy