Bug 1045 - beadm create fails with a traceback when run as user
: beadm create fails with a traceback when run as user
Status: CLOSED DUPLICATE of bug 2080
Product: installer
beadm
: unspecified
: Other Solaris
: P3 normal (vote)
: in-preview
Assigned To: Tim Knitter
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-04-08 17:55 UTC by Ethan Quach
Modified: 2008-07-14 15:52 UTC (History)
2 users (show)

See Also:


Attachments


Note

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


Description Ethan Quach 2008-04-08 17:55:14 UTC
equach@opensolaris:~$ beadm create newBE
Traceback (most recent call last):
  File "/usr/sbin/beadm", line 1296, in ?
    ret = main()
  File "/usr/sbin/beadm", line 557, in main
    return(parseCLI(sys.argv[1:]))
  File "/usr/sbin/beadm", line 532, in parseCLI
    rc = create(optsArgs)
  File "/usr/sbin/beadm", line 146, in create
    if initBELog("create", be) != 0:
  File "/usr/sbin/beadm", line 1244, in initBELog
    os.makedirs(os.path.dirname(be.log), 0644)
  File "/usr/lib/python2.4/os.py", line 156, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.4/os.py", line 159, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/log/beadm'
Comment 1 Tim Knitter 2008-04-09 16:01:19 UTC
The attempt to create the log directory should be wrapped in a

try: 

except OSError, e: 

block and return a valid message
Comment 2 Tim Knitter 2008-05-06 12:46:29 UTC
After the fix, when invoking 'beadm create ...' as a normal user, the output
will be something similar to this:

line1-x2100% beadm create BE4
beadm: [Errno 13] Permission denied: '/var/log/beadm/BE4'
beadm: Unable to create log file
Comment 3 Tim Knitter 2008-07-14 15:52:05 UTC
*** This bug has been marked as a duplicate of bug 2080 ***