Help with permissions

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Help with permissions
# 1  
Old 03-10-2017
Help with permissions

i am trying to write a simple script to move files from one folder to another and when i try to run the script i get permission errors. I am still new to all of this and permissions still confuse me. Can anyone shed some light?

I have attached screenshots of my script in the middle. (which i have taken from another to use for this)
At the top is the output and at the bottom is the file i want moved. If there is any other info i can get let me know.

thanks.
Help with permissions-unixpng
# 2  
Old 03-10-2017
Hi, can you post the output of:
Code:
ls -ld /ftp /ftp/Archive
id

# 3  
Old 03-10-2017
Hi,

This looks like a very AIX-specific IBM-style error message that's more detailed than what I've ever seen mv give for a simple file permissions issue on Solaris or Linux, but I'm inclined to believe that it means what it says it does. Either you don't have permission to copy the file into the destination directory, or you don't have permission to remove it from the source directory.

So unless it's some error message specific to role-based access control on AIX or something equally unique (in which case someone familiar with the intricacies of AIX can hopefully help, as I'm not really experienced with it at all) I'd start with checking that.

One easy test: if you try doing this exact mv command manually at the shell prompt, does it work ? If not, can you copy the file into the destination directory ? And if you can copy it, can you remove the original ? Doing this kind of basic step-by-step debugging should hopefully reveal where the problem lies.
# 4  
Old 03-13-2017
This is refusing one of three things:-
  • You can't write to the source directory (cannot unlink the old reference)
  • You can't write to the target directory (cannot link the new reference)
  • You can't read the source file (read to copy if moving filesystem)

In addition to the output requested by Scrutinizer, can you list the file you want to move with ls -ld lynx*test*

It might also be worth dropping the trailing /. from the target directory on the move, so it becomes mv lynx*test* $clftparchive only.
It would be wise to check that this directory exists before trying to write to it with:-
Code:
if [ -d $clftparchive ]
then
   # do the move
else
   # throw an error alert
fi


I'm sure we can help you work this out,
Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Permissions

Hi guys, i write the below script to make the user get to the directory that interesting. Now what I am trying is to check the permissions of the directory and if the directory exists to check the reading options. echo "Please enter your desire folder directory ( \yourfolders) ?: \c" ... (9 Replies)
Discussion started by: mikerousse
9 Replies

2. UNIX for Dummies Questions & Answers

Permissions

Hi, I have noticed that on my Linux box there is a nice feature which make it impossible for specified member (owner, group or other) to have an given access if a member from which we would expect it more don't have that access. So it is impossible to read file by all if others have set read... (3 Replies)
Discussion started by: DavidMax
3 Replies

3. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

4. Shell Programming and Scripting

permissions

My /tmp is set with the following permissions (777) and a 't' at the end. My umask is set to 022. When I create a directory under /tmp (tmp/xx) it gets created as 755 as expected. Yet when I create a file within that directory (/tmp/xx/yy) the permissions are not 755 they are 644. ... (1 Reply)
Discussion started by: BeefStu
1 Replies

5. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

6. HP-UX

Permissions

Hey, We've got quite a strange problem on our hands here. We are running an HP 9000/800 B.11.00. I've just created a new group in /etc/group which i called, let's say newgroup . Then I added 4 users to the group, namely user1, user2, user3, user4 . The command grpchk shows no strange things... (4 Replies)
Discussion started by: chrizz
4 Replies

7. UNIX for Dummies Questions & Answers

permissions

I saved a perl code in xemacs. I used an xterminal to execute it but unix said that I don't have permission. I saved the files in my home directory. How do I change the permission. This is hat unix said: -ksh: ./names.pl: cannot execute (5 Replies)
Discussion started by: lnatz
5 Replies

8. UNIX for Dummies Questions & Answers

Permissions

Hi everyone, I'm looking for some information concerning Unix permissions. I am new to Unix and am doing research for a graduate class. Given the permissions below, can anyone give me five unique exploits that would be available to a hacker/cracker given this configuaration? -rw-rw-rw- 1... (1 Reply)
Discussion started by: skeeter
1 Replies

9. UNIX for Dummies Questions & Answers

help with permissions

Can anyone help explain the "s" in the below permissions example. I was reading about the "sticky bit" (t) but I am a little confused. On file "test" wolf% chmod 4777 test wolf% ls -l total 4 drwx------ 2 john staff 512 Mar 19 21:34 nsmail -rwsrwxrwx 1 john staff ... (2 Replies)
Discussion started by: finster
2 Replies

10. UNIX for Dummies Questions & Answers

permissions

with permission set to d-wx--x--x directoryname Why can't I do a long-listing on this directory? Is read access necessary? (1 Reply)
Discussion started by: mma_buc_98
1 Replies
Login or Register to Ask a Question