uuencode & uudecode - permissions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting uuencode & uudecode - permissions
# 1  
Old 09-07-2008
uuencode & uudecode - permissions

Code:
$ ls -l example_1.sh
-rwxr--r-- 1 vsetm7am nofiles 918 Sep  5 19:54 example_1.sh
$ stat -c %a example_1.sh
744
$ uuencode "test.file" <example_1.sh >uuexample.uu
$ uudecode uuexample.uu
$ ls -l test.file
-rw-r--r-- 1 vsetm7am nofiles  918 Sep  7 14:44 test.file

How come that the user "lost" permission to execute file? Is it some kind of protection against bad apps/scripts? I didn't find a note in man page of uuencode.

Thank you!
# 2  
Old 09-07-2008
You are redirecting from standard input, so uuencode doesn't see a file, just a stream of bytes. Maybe try passing it a file name argument (remove the <) or change the permissions on the BEGIN line in the uuencoded file with a simple sed script.
# 3  
Old 09-07-2008
2era: you're right thank you! :-)
(Changing via sed script wouldn't be problem but I didn't understand the behaviour and that was what confused me)

Well teacher said that pipe connects stdout of first program with stdin of the second program and I thought it's not so simple and that there're some other values that pipes sends but obviously I was wrong..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Uuencode & Mailx

hi, i am trying to send a pdf attachment which has a name of 200 characters using uuencode and mailx. But the email is not getting delivered. uuencode <filename.pdf> <filename.pdf> | mailx -s "Test" <email_id> (2 Replies)
Discussion started by: ATWC
2 Replies

2. OS X (Apple)

Wordpress & Git, urgent permissions issues, need help...

Heya, So I recently upgraded my MacBook to a solid state drive, during the re-install of Snow Leopard I chose to abandon MAMP and use the built in Apache & PHP and in doing so moved my ~/Sites to /Library/WebServer/Documents from a Time Machine backup. During this transition the permissions... (0 Replies)
Discussion started by: s3w47m88
0 Replies

3. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

4. UNIX for Dummies Questions & Answers

Uuencode & Uudecode - file gets corrupted

I need to convert jar files from bin-to-ascii, and then reverse ascii-to-bin. The 'cksum' do not match for few files before and after. Any idea why Uuencode is corrupting some files? I am using the following commands: To encode: uuencode -m /tmp/in/myfile.jar myfile.jar >... (5 Replies)
Discussion started by: aishwarya_rai
5 Replies

5. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

6. UNIX for Dummies Questions & Answers

Permissions & Webhosting

I just setup a Fedora10 box. I used yum to install : httpd php mysql mysql-server php-mysql Then I went out to wordpress (blogging software) and installed wordpress in /etc/httpd/wordpress I imported my wordpress database into mysql and its all working. Except for a few things. When I... (2 Replies)
Discussion started by: flood
2 Replies

7. 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

8. UNIX for Dummies Questions & Answers

problem with rdist & permissions

I have a .rdist & .sh files. shell script contains code like this rdist -h -f <rdist file> when this script executed i am getting the following error. rdist:<full path of files>: Permission denied. I verified the folder on the other system by connecting FTP.It doesn't has write... (0 Replies)
Discussion started by: Mar1006
0 Replies

9. Shell Programming and Scripting

Extract directories, users, groups & permissions to excel

Hi As the title descibes I wish to create an excel spreadsheet which lists all directories in full allong with the users, groups and rights. I have not used Perl scripts before so I'm a little lost on this on. Cheers (0 Replies)
Discussion started by: MacLon
0 Replies

10. UNIX for Advanced & Expert Users

UUencode UUdecode

Could any 1 send me the details for uuencode and decode . I am working on something which was coded by some1 else using these two commands . I am having a a pwd file with password in the encrypted form as y\215G\216!A\231Ò.:¹... they use a key file which decrpt that pwd file ....key file... (2 Replies)
Discussion started by: myelvis
2 Replies
Login or Register to Ask a Question