Sponsored Content
Top Forums Shell Programming and Scripting Help- writing to dir with no write permissions (script) Post 302765757 by Reb0rn on Sunday 3rd of February 2013 09:29:36 AM
Old 02-03-2013
Quote:
Originally Posted by RudiC
This is only 1/3 of what I asked you to post. What user are you? Should you be root, no wonder you can write to that dir. Should you not be rot, we need the xtrace log.

i am user root yes.. would that be the reason? sorry-- noob on unix. but why then we have to chmod every script to run it?

also .. the dir has no write permissions ..does root user overwrite this?

i have ran the trace.. shows the following.


Code:
[root@localhost no_write_perm]# sh directorycheck.sh 
sh directorycheck.sh 
+ sh directorycheck.sh
 please enter the dir path
/var/tmp/no_write_perm
 File hello.out is created
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"
++ echo -ne '\033]0;root@localhost:/var/tmp/no_write_perm'
[root@localhost no_write_perm]#


Last edited by Reb0rn; 02-03-2013 at 10:35 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File and Dir permissions

I would like to configure my SuSE 7.0 workstation more securely. I have attempted for about two weeks to find a guideline on good practices for the file and directory permissions.........but to no avail. Does anyone have a guideline that I could use to help me out. I realize that the distros are... (11 Replies)
Discussion started by: thomas.jones
11 Replies

2. Shell Programming and Scripting

writing files to a dir in round robin order

I have a list of directories. (say a1,a2,a3,a4,a5) I need to get the directory last modified and access the next one to put some files over there (say if a3 is the latest dir modified ie, last time files were put into a3, this time I need to move the files in a4)...and if a5 is the last modified... (6 Replies)
Discussion started by: kanchan_cp
6 Replies

3. Shell Programming and Scripting

i want to write a script to test the folder permissions

Hi All, I want a script to test folder permissions.( to alert me if a folder /abc/xyz does not have 775 permissions). i want to test /abc/xyz is having 775 permissions or not if not it has to alert me. Please help me ASAP Thanks in advance (4 Replies)
Discussion started by: rajesh212512
4 Replies

4. Shell Programming and Scripting

Shell Script to save/restore files and dir permissions

Hello all: I need found script to save and restore file permissions and owner:group... this is for backup my server... I have one problem in my server and file permissions and owner:group, mess up.. For this reason i need found one way to secure this aspect of the server... Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies

5. Shell Programming and Scripting

to write a script to compare the file size in the current directory and previous dir

hi, i am new to this site. i want to write a script to compare the file size of the files in the current dir with the files in the previous directory. the files name will be same, but the filename format will be as xyzddddyymm.txt. the files will arrive with the month end date(i want to... (5 Replies)
Discussion started by: tweety
5 Replies

6. Shell Programming and Scripting

help writing rm script excluding specific titled dir

I am attempting to write a housecleaning script that does the following: 1) goes to a specific directory 2) deletes all contents of that directory but a specific directory within it. So my users all keep and use the Shared directory in OSX. Within /Users/Shared there are also standard named... (1 Reply)
Discussion started by: nomados
1 Replies

7. Shell Programming and Scripting

Dir permissions

Hi All, I have a script which will be run by another user say user 2 which will create a new dir say dir 4 in my work place and copy certains files from his dir. /t1/t2/t3/dir4 I want to allow the user to create the dir dir4 and copy the files,but bring the control back to my name say user... (2 Replies)
Discussion started by: prasperl
2 Replies

8. Shell Programming and Scripting

Have files take on DIR permissions

Hello all; I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account: 1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies

9. UNIX for Advanced & Expert Users

Allow user without dir write permission to execute a script that creates files

In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies

10. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

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)
Discussion started by: blinkingdan
0 Replies
SYNCACHE-DRB(1) 					      General Commands Manual						   SYNCACHE-DRB(1)

NAME
syncache-drb - SynCache dRuby object cache server SYNOPSIS
syncache-drb [ options ] [ URI ] DESCRIPTION
syncache-drb starts a Distributed Ruby server providing a SynCache::Cache object. SynCache::Cache is a thread-safe time-limited object cache with flexible replacement strategy. OPTIONS
URI A URI with druby: schema that the DRb server binds to, default is druby://localhost:9000 --help Display usage information and quit. --ttl SECONDS Time-to-live value for cache entries, default is 24 hours. --size ENTRIES Maximum number of objects in cache, default is 10000. --flush-delay SECONDS Rate-limit flush operations. If less than that number of seconds has passed since last flush, next flush will be delayed. Default is no rate limit. --user USER Run as USER if started as root. Default is nobody. --error-log ERROR_LOG_PATH File to write errors to. Default is /dev/null. When run as root, the file is chowned to USER:adm. --debug Enable debug mode. If an error log is specified with --error-log, all messages will be sent there instead of syslog. --pidfile PATH Path to pidfile. By default, pidfile is created under /var/run/syncache-drb/ when run as root, or under $TMPDIR otherwise. Location should be writeable by USER. AUTHOR
This manual page was written by Dmitry Borodaenko <angdraug@debian.org>. Permission is granted to copy, distribute and/or modify this doc- ument under the terms of the GNU GPL version 3 or later. SYNCACHE-DRB(1)
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy