Cannot Create Error In Unix
Contents |
here for a quick overview of the site Help Center
Cannot Stat Error In Unix
Detailed answers to any questions you might have Meta Discuss cannot open error in unix the workings and policies of this site About Us Learn more about Stack Overflow cannot create the specified file unix the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
How To Redirect Error In Unix
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unix shell script errors [closed] up vote -1 down vote favorite Below script is to push file to
Standard Error Unix
remote location through sftp,i faced lot of issues to write below code.But still i am facing some issue,Please guid me to resolve the issues.It's not working with sh.it is only working with ksh. #test script #------------------------------------------------------------------- #!/bin/sh #------------------------------------------------------------------------ # sftp_file_uploads.sh #------------------------------------------------------------------------ export REMOTE_SERVER_PROD='192.168.0.1' export REMOTE_SERVER_FAILOVER='192.168.0.2' export SFTP_PORT='0001' export SOURCE_FUNCTIONAL_ID='testusr' export SOURCE_FILE_DIRECTORY='/var/temp/files/' export SOURCE_ARCHIVE_DIRECTORY='/var/temp/files/archive' export DATE_FORMAT=`date "+%Y%m%d"` export LOG_DIRECTORY='/var/temp/logs' export DESTINATION_FILE_DIRECTORY='/dest' export LOG_FILE='$LOG_DIRECTORY/test_$DATE_FORMAT.log' export SFTP_BATCH_FILE='/var/tmp/SFTP_BATCH_FILE' #------------------------------------------------------------------------ # Find if the files are available at the source directory. #------------------------------------------------------------------------ cd $SOURCE_FILE_DIRECTORY export FILE_TO_UPLOAD_TESTD=`ls -lrt TESTD$DATE_FORMAT.csv | awk '/TESTD/{ f=$NF };END{ print f }'` export FILE_TO_UPLOAD_TESTDF=`ls -lrt TESTDF$DATE_FORMAT.csv | awk '/TESTDF/{ f=$NF };END{ print f }'` #------------------------------------------------------------------------ # Try 2 times and Sleep for 5 mins if either of the files is not present #------------------------------------------------------------------------ counter=0 flag_file_found_TESTD=0 flag_file_found_TESTDF=0 while [ $counter –lt 2 ] do #--------------------------- # Check TESTD file arrived #--------------------------- if [ -z $FILE_TO_UPLOAD_TE
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or unix redirect 2 &1 posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is
Touch: 0652-046 Cannot Create In Aix
a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody touch cannot touch permission denied can ask a question Anybody can answer The best answers are voted up and rise to the top Can't create a file even if rights allow and I've relogged in up vote 0 down vote favorite I try to create file http://stackoverflow.com/questions/13095259/unix-shell-script-errors in folder with group write access, user tomcat7 is in group. Why isn't it workin? skr@konrad~/data/asu$ sudo -u tomcat7 sh $ whoami tomcat7 $ echo > /home/skr/data/asu/g.gz.index sh: 2: cannot create /home/skr/data/asu/g.gz.index: Permission denied $ ls -la /home/skr/data/asu/ total 18708 drwxrwxr-x 2 skr skr 4096 Sep 29 08:38 . drwxrwxr-x 85 skr skr 4096 Jul 30 00:42 .. $ grep ^skr /etc/group skr:x:1002:tomcat7:mail Tried to logout, but it doesn't help. Any ideas? unix filesystems share|improve this question asked Sep 30 '12 at http://superuser.com/questions/481503/cant-create-a-file-even-if-rights-allow-and-ive-relogged-in 6:58 stiv 6917 migrated from stackoverflow.com Sep 30 '12 at 15:09 This question came from our site for professional and enthusiast programmers. add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Try looking at the output of id or groups. These commands show the truth of what groups the current process is actually a member of, more than grepping /etc/group does. You will probably find that the "tomcat7" user is not actually a member of the "skr" group as you intended it to be. The reason is that you have a syntax error in /etc/group: each line of that file is supposed to contain 4 colon-delimited fields (group name, password, gid, list of members), but the line you show has 5 fields. Remove the extraneous field and delimiter (:mail) and try again. share|improve this answer answered Sep 30 '12 at 15:09 Celada 1,74948 add a comment| You must log in to answer this question. Not the answer you're looking for? Browse other questions tagged unix filesystems . asked 4 years ago viewed 616 times active 4 years ago Related 1I can't open the green filename files from my desktop where Window7 was installed0Get all files created in past 24 hours - unix1How to create a file with symbols in its name3What unix command would I be able to write a Bash Shell script that would create files in a series of directories?1Discrepancy between df and du2Can I create a sym
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://unix.stackexchange.com/questions/45184/why-this-error-cannot-create-directory-foo-permission-denied Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers error in are voted up and rise to the top Why this error: “cannot create directory `foo': Permission denied” up vote 4 down vote favorite 1 I get this error when I try creating a directory: [rex <03:57 PM> /var/tmp/pb82]$ mkdir foo mkdir: cannot create directory `foo': Permission denied But doesn't the following output indicate that I should be able to create directories there since I am a member of the www-data group to error in unix which that directory belongs? [rex <03:57 PM> /var/tmp/pb82]$ ls -l .. total 8 drwxrwxr-x 5 root www-data 4096 Aug 7 15:32 jinfo drwxrwxr-x 3 root www-data 4096 Aug 7 20:43 pb82 [rex <03:58 PM> /var/tmp/pb82]$ whoami rex [rex <03:58 PM> /var/tmp/pb82]$ groups rex users www-data Edit: in response to @UlrichDangel: [rex <04:08 PM> /var/tmp/pb82/jinfo]$ id uid=1008(rex) gid=100(users) groups=100(users) permissions group share|improve this question edited Aug 10 '12 at 22:01 Gilles 369k676711120 asked Aug 9 '12 at 23:04 RexE 14515 add a comment| 1 Answer 1 active oldest votes up vote 8 down vote accepted You probably added yourself to the www-data group and didn't relogin afterwards. To change your group membership you can use sg www-data to get a new shell with the appropriate permissions. groups will return the data from the database and not your effective permissions - from man groups: Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed). share|improve this answer answered Aug 9 '12 at 23:11 Ulrich Dangel 16.9k14460 1 That fixed it, thanks! –RexE Aug 9 '12 at 23:33 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Face