uuencode does not correctly encode file permissions when reading from stdin

Bug #283087 reported by AlainKnaff
2
Affects Status Importance Assigned to Milestone
sharutils (Ubuntu)
Invalid
High
Unassigned

Bug Description

When reading from stdin, uuencode does not correclty encode file permissions, but always assumes 644:

To reproduce:

> touch x
> chmod 755 x
> uuencode x <x
begin 644 x
`
end

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Still the case today.

Changed in sharutils (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Jon Grimm (jgrimm) wrote :

I'm not sure this is actually a bug, but working as designed.

As being used one is specifying that input-file is coming off of stdin, so it uses hardcoded permissions (since it doesn't have anything else to really go on). Also not that when you are saying 'uuencode x' you 'x' is simple the output-name that will be put into the uuencode header, not the actual out-put filename, so it can be derived from that argument either.

So instead specifiy an input file if you want permissions to be derived from the actual input file:

jgrimm@jgrimm-ThinkPad-X250:~/tmp$ touch x
jgrimm@jgrimm-ThinkPad-X250:~/tmp$ chmod 755 x
jgrimm@jgrimm-ThinkPad-X250:~/tmp$ uuencode x x
begin 755 x
`
end

Changed in sharutils (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.