You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Jared Robinson (JIRA)" <ji...@apache.org> on 2008/09/02 22:03:44 UTC

[jira] Created: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Upload to a file:// path needs ability to specify permissions
-------------------------------------------------------------

                 Key: BUILDR-143
                 URL: https://issues.apache.org/jira/browse/BUILDR-143
             Project: Buildr
          Issue Type: Bug
          Components: Core features
    Affects Versions: 1.2.10
         Environment: Linux(RHEL 4) with a samba mount point
            Reporter: Jared Robinson


When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:

temp.chmod(0644)

It may be appropriate to add an option :permissions so that users can specify what file mode they want. This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630496#action_12630496 ] 

lacton commented on BUILDR-143:
-------------------------------

You're right, using the current mode of the source file for #2 is better.

If the source file is created with no explicit mode, the OS will use the user's umask to set this file's permissions and these default values will be kept when moving the file around, whether by file://, sftp or packaging.

If the source file is created with an explicit mode, it will be kept even when moving it around.

And this behavior can be generalized for all transports and packaging mechanisms.

It sounds very consistent to me.

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629195#action_12629195 ] 

Assaf Arkin commented on BUILDR-143:
------------------------------------

This is indeed related to BUILDR-23, we should use the same method/option name everywhere. I suggest "mode".

Besides allowing you to set the file mode on upload/release, what would be the best default mode?

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Joel Muzzerall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736872#action_12736872 ] 

Joel Muzzerall commented on BUILDR-143:
---------------------------------------

I have a patch here that addresses part of the issue at least.  When uploading to a file it will now preserve permissions instead of defaulting to 600.  Is this a step in the right direction?  I might keep working on this.

Uploading as 001_preserve_permissions...

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628447#action_12628447 ] 

lacton commented on BUILDR-143:
-------------------------------

I confirm this issue exists on trunk.

I do not understand your suggestion about a :permissions option.  How would you like to set this option in your buildfile?

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629837#action_12629837 ] 

Assaf Arkin commented on BUILDR-143:
------------------------------------

You mean Net::SFTP the library; SFTP the protocol doesn't have a permission option, but it does have a chmod command that accepts two arguments, mode and path.  Likewise, you can use File::Stat.mode in Ruby to read the file's permission mode and File.chmod to modify it.  I would expect us to be consistent with Ruby's core library (i.e. File.stat/chmod).



> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "lacton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630370#action_12630370 ] 

lacton commented on BUILDR-143:
-------------------------------

If I've followed correctly, that would mean the upload target file permissions would be, by decreasing priority,
1. a user-provided mode (e.g., :mode=>755)
2. the current umask (applicable only for file://)
3. world-readable (e.g., 0644)

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Jared Robinson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jared Robinson updated BUILDR-143:
----------------------------------

    Description: 
When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:

temp.chmod(0644)

I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:

temp.chmod(0666 - File.umask)

This could be related to issue BUILDR-23

  was:
When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:

temp.chmod(0644)

I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. 

This could be related to issue BUILDR-23


> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme updated BUILDR-143:
----------------------------------

    Fix Version/s: 1.4.2

Cool, the patch is still very up-to-date. Targeting 1.4.2.

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>             Fix For: 1.4.2
>
>         Attachments: 001_preserve_permissions_code.patch, 001_preserve_permissions_spec.patch
>
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Jared Robinson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jared Robinson updated BUILDR-143:
----------------------------------

    Description: 
When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:

temp.chmod(0644)

I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. 

This could be related to issue BUILDR-23

  was:
When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:

temp.chmod(0644)

It may be appropriate to add an option :permissions so that users can specify what file mode they want. This could be related to issue BUILDR-23


> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. 
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630454#action_12630454 ] 

Assaf Arkin commented on BUILDR-143:
------------------------------------

I assume in #2 you mean the current mode of the source file, if no other mode specified (that would be #1)? 
Why only file://, why not do the same when using sftp://, or when including files in a zip/tar?

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902223#action_12902223 ] 

Hudson commented on BUILDR-143:
-------------------------------

Integrated in Buildr-ci-build #104 (See [https://hudson.apache.org/hudson/job/Buildr-ci-build/104/])
    

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>             Fix For: 1.4.2
>
>         Attachments: 001_preserve_permissions_code.patch, 001_preserve_permissions_spec.patch
>
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Joel Muzzerall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joel Muzzerall updated BUILDR-143:
----------------------------------

    Attachment: 001_preserve_permissions_code.patch
                001_preserve_permissions_spec.patch

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>         Attachments: 001_preserve_permissions_code.patch, 001_preserve_permissions_spec.patch
>
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Jared Robinson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629829#action_12629829 ] 

Jared Robinson commented on BUILDR-143:
---------------------------------------

As for the "best" default mode... for file:// URLs, the best default mode is to honor the umask. That means that if "permissions" aren't set, then the umask is honoured. If "permissions" is set, then the umask is not a factor.

For FTP uploads, it should probably default to being readable by everyone.

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Jared Robinson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629828#action_12629828 ] 

Jared Robinson commented on BUILDR-143:
---------------------------------------

I think we should go with "permissions" because it is already the established method with sftp. I'd like it to be consistent everywhere, and backwards compatible.

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Jared Robinson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628515#action_12628515 ] 

Jared Robinson commented on BUILDR-143:
---------------------------------------

It appears from reading transports.rb, that for SFTP, it's possible to set a :permissions option -- although I don't know how to specify the option. So, it would be nice if for file:// uploads, setting the :permissions option worked similar to the way it works for SFTP permissions. Would that be something like one of the following?

1. upload artifact, :permissions => 0622
2. repositories.release_to[:permissions] = 0622

Having buildr honor my umask is good enough for now.

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-143) Upload to a file:// path needs ability to specify permissions

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme resolved BUILDR-143.
-----------------------------------

    Resolution: Fixed

Marking issue as fixed for 1.4.2. Thanks Joel!

> Upload to a file:// path needs ability to specify permissions
> -------------------------------------------------------------
>
>                 Key: BUILDR-143
>                 URL: https://issues.apache.org/jira/browse/BUILDR-143
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.2.10
>         Environment: Linux(RHEL 4) with a samba mount point
>            Reporter: Jared Robinson
>             Fix For: 1.4.2
>
>         Attachments: 001_preserve_permissions_code.patch, 001_preserve_permissions_spec.patch
>
>
> When uploading an artifact to a file:// repository URL, the permissions on the artifact are rw by owner, but unreadable by anyone else. When I deploy to a samba share, this is a problem, because no one else can read the artifact. I've tracked it down to the use of Tempfile in transports.rb. Tempfile always creates a file with permission 600. If I add the following code, everything works as expected:
> temp.chmod(0644)
> I'd prefer it if the artifact was created using my default umask, and then allow me to override it with an option :permissions so that I can specify what file mode I want. So a better fix would be the following:
> temp.chmod(0666 - File.umask)
> This could be related to issue BUILDR-23

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.