Exception thrown but nothing in message.log

Leonard Chatagnier lenc5570 at sbcglobal.net
Sun Aug 31 17:22:34 UTC 2008


--- Bill Walton <bill.walton at charter.net> wrote:

> I'm getting a exception thrown when trying to print
> to a shared printer from NetBeans.  I realize that
> the root problem is NetBeans, not Ubuntu.  The
> reason I'm posting here is that the error message
> says I should see something in messages.log.  
> 
What? Are you reading this from /var/log in Ubuntu?
In Ubuntu/Debian the file is simply named "messages"
with a .0 ext for an older version and .*.gz for older
compressed versions. If your reading "messages.log"
somewhere else then I'm clueless.

> I did have some content in messages.log but wanted
> to get a clean, one attempt -> one error, log to
> attach to the issue I filed at netbeans.org.  So
> removed messages.log and then created an empty
> version with vi.
Wasn't a good idea. You could have just copied the
pertinent portion of the "messages" log file and
pasted it into your message to Netbeans.  Assuming
your reading it from a terminal in X windows and not
from a tty terminal. You also probably changed the
owner/user of the file so now it doesn't record
properly.

  Now when I attempt to print from
> NB I get the same exception but nothing is being
> written to messages.log.  The permissions on the
> file I created are '-rw-r--r--'.
In /var/log/messages I have:
lchata at ubuntu-hardy-64bit:/var/log$ ls -l messages
-rw-r----- 1 syslog adm 339412 2008-08-31 11:24
messages
You should have the same permissions and owner/user
for the messages file to record correctly. So change
your owner/user and permissions accordingly and be
sure not to name the file "messages.log" but
"messages"
You should read the man for chown and chmod

  I tried 'chmod +w
> messages.log' but the permissions are not changed. 
> Interestingly (to my newbie brain, anyway) 'chmod +x
> messages.log' _did_ change the permissions.  
> 
I'm not sure just what you did. Assuming you used sudo
for the commands as it shouldn't work without it
unless you didn't use sudo to create the file. In that
case you are the new owner and can chown and chmod
without sudo. My guess is that "chmod +w didn't change
the owner permission because the owner already had
write permission and that chmow +x changed it because
that permission wasn't there.  To change the
permission for owner, group and others you would use
"a + w", Read the mans on this.

> So my main question is...  did I screw something up
> with how I approached messages.log?  Or is this all
> a NB issue?
>
Yes, I think you did. A word to the wise is don't
change anything in the OS unless you know what you are
doing. You should create the "message" file in var/log
as I have in my case and it should work.
 
> And secondly, why can I add execute permissions but
> not write permissions?
> 
You can do both if you do it right.  RTFM for help in
proper syntax. You have to be sudo root to change
permissions, ownership unless you are the owner of the
file.  In this case you are not supposed to be the
owner and shouldn't have changed it if you actually
did.  It would be helpful to the list is you posted
the result of:

ls -al <your message.log> what the owner/permission
are on the file you created.
> TIA,
> Bill> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
>
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> 


Leonard Chatagnier
lenc5570 at sbcglobal.net




More information about the ubuntu-users mailing list