Bug 702524 - rhncfg-client does not deploy an file when permission is set to 000 by webUI
Summary: rhncfg-client does not deploy an file when permission is set to 000 by webUI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marcelo Moreira de Mello
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space15 702535
TreeView+ depends on / blocked
 
Reported: 2011-05-06 02:24 UTC by Marcelo Moreira de Mello
Modified: 2012-03-06 08:49 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 702535 (view as bug list)
Environment:
Last Closed: 2011-07-21 14:43:00 UTC
Embargoed:


Attachments (Terms of Use)
Patch proposed (1.17 KB, patch)
2011-05-06 03:51 UTC, Marcelo Moreira de Mello
no flags Details | Diff
Patch proposed (enhanced) (1023 bytes, patch)
2011-05-06 14:31 UTC, Marcelo Moreira de Mello
no flags Details | Diff

Description Marcelo Moreira de Mello 2011-05-06 02:24:45 UTC
Description of problem:

rhncfg-client shows  python exception when trying to deploy an file with permission set to 000

Below the python exception: 

[root@client ~]# rhncfg-client verify
         /etc/test-dir
 missing /etc/test-file

[root@client ~]# rhncfg-client  get
Traceback (most recent call last):
  File "/usr/bin/rhncfg-client", line 34, in ?
    sys.exit(Main().main() or 0)
  File "/usr/share/rhn/config_common/rhn_main.py", line 187, in main
    handler.run()
  File "/usr/share/rhn/config_client/rhncfgcli_get.py", line 25, in run
    self.options.exclude)
  File "/usr/share/rhn/config_common/deploy.py", line 53, in deploy_files
    dep_trans.add_preprocessed(path, processed_path, file_info, dirs_created)
  File "/usr/share/rhn/config_common/transactions.py", line 192, in add_preprocessed
    self._chown_chmod_chcon(processed_file_path, dest_path, file_info, strict_ownership=strict_ownership)
  File "/usr/share/rhn/config_common/transactions.py", line 151, in _chown_chmod_chcon
    mode = string.atoi(str(mode), 8)
  File "/usr/lib64/python2.4/string.py", line 403, in atoi
    return _int(s, base)
ValueError: invalid literal for int(): 


Version-Release number of selected component (if applicable):
Spacewalk 1.5


How reproducible:
100%


Steps to Reproduce:
1. create a configuration channel
2. create a file with permission set to 000
3. run rhncfg-client get to deploy the files
  
Actual results:

rhncfg-client shows an python exception


Expected results:

rhncfg-client works as expected

Comment 1 Marcelo Moreira de Mello 2011-05-06 02:26:35 UTC
Working in this bug

Cheers, 
Marcelo Moreira de Mello

Comment 2 Marcelo Moreira de Mello 2011-05-06 03:51:46 UTC
Created attachment 497274 [details]
Patch proposed

Hello, 

Follow attached the patch proposed to fix this bug. This patch were sent to spacewalk-devel mailist for approval. 

  Mail Thread: https://www.redhat.com/archives/spacewalk-devel/2011-May/msg00001.html

 Cheers,
Marcelo Moreira de Mello

Comment 3 Marcelo Moreira de Mello 2011-05-06 14:31:58 UTC
Created attachment 497371 [details]
Patch proposed (enhanced)

Follow a better formed patch to fix this issue. Patch already sent to spacewalk-devel maillist. 

Cheers, 
Marcelo Moreira de Mello

Comment 4 Marcelo Moreira de Mello 2011-05-06 14:37:55 UTC
Hello, 

Fixed in spacewalk master git bbc13b8e49e78dbe463b4aaa495a5b9ecef9bc81 

Cheers, 
Marcelo Moreira de Mello

Comment 5 Jan Pazdziora (Red Hat) 2011-07-21 14:43:00 UTC
Spacewalk 1.5 was released.


Note You need to log in before you can comment on or make changes to this bug.