IOError: [Errno 30] Read-only file system: '/usr/share/gufw/cfg_files/gufw_log.txt'

Bug #276276 reported by ross sumera
4
Affects Status Importance Assigned to Milestone
Gufw
Fix Released
Undecided
costales

Bug Description

gufw_0.20.3-all.deb

/usr is designed only for static files. it is a very bad programming practice to write system log files in /usr directory

log files should reside in /var/log directory.

root@host:/home/user# /usr/bin/gufw
Traceback (most recent call last):
  File "/usr/share/gufw/gufw.py", line 86, in <module>
    Gufw = init_gufw(gufw)
  File "/usr/share/gufw/gufw.py", line 72, in init_gufw
    initializations(gufw)
  File "/usr/share/gufw/gufw.py", line 53, in initializations
    refresh_gufw_log(path_gufw_log)
  File "/usr/share/gufw/general_rutines.py", line 235, in refresh_gufw_log
    l_file = open(p_file, "w")
IOError: [Errno 30] Read-only file system: '/usr/share/gufw/cfg_files/gufw_log.txt'

please modify /usr/share/gufw/variables_paths_messages.py

to

# Paths configurations
path_locale_check = sys.path[0] + "/locale-langpack/es/LC_MESSAGES/gufw.mo"
path_locale1 = sys.path[0] + "/locale-langpack"
#path_gufw_log = sys.path[0] + "/cfg_files/gufw_log.txt"

# System paths
path_system_root = "/usr/share/"
path_locale2 = "/usr/share/locale-langpack"
path_ufw_status = "/etc/ufw/ufw.conf"
path_ufw_config = "/etc/default/ufw"
path_ufw_rules_ipv4 = "/var/lib/ufw/user.rules"
path_ufw_rules_ipv6 = "/var/lib/ufw/user6.rules"
path_gufw_log = "/var/log/gufw_log.txt"

better still create a /var/ufw or /var/gufw directory and put all your variable ufw/gufw stuff in there

Revision history for this message
costales (costales) wrote :

Hi!
Thanks by the bug.
Can you check the version 0.20.4 alpha, please?
Thanks very much!
https://code.launchpad.net/gui-ufw/main/0.20.0/

Changed in gui-ufw:
assignee: nobody → marcos.alvarez
status: New → Fix Committed
Revision history for this message
Hew (hew) wrote :

I can confirm that the config files are now in /var/* with gufw 0.20.4_beta.

costales (costales)
Changed in gui-ufw:
status: Fix Committed → Fix Released
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.