<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9348</bug_id>
          
          <creation_ts>2016-03-25 20:10:29 +0000</creation_ts>
          <short_desc>Opkg requires root privileges for all operations</short_desc>
          <delta_ts>2020-10-30 07:40:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.3.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>0.4.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alejandro del Castillo">alejandro.delcastillo</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          <cc>lpapp</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>60425</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-03-25 20:10:29 +0000</bug_when>
    <thetext>Opkg is creating it&apos;s lock file under /var/run, which has drwxr-xr-x root-root permissions. Any opkg operation under an unprivilged user will throw:

Collected errors:
 * opkg_lock: Could not create lock file /var/run/opkg.lock: Permission denied.

A better place for lock file is /var/run/lock (maps to /run/lock). If writes can be made atomic (via a tmpfile), then reads shouldn&apos;t need a lock and an unprivileged user should be able to do any operations than only requires reads. Since any user can create files in /var/run/lock, opkg will need to make sure that the user is root when creating the lock.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61863</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-05-02 22:16:18 +0000</bug_when>
    <thetext>*** Bug 8174 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88526</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2020-10-30 07:40:32 +0000</bug_when>
    <thetext>/var/run/lock permissions are too open, left lock on /var/run. 

Commit feb40ec55c07aabe7a925f0338156f71582041a5 removed the need to be root for read-only operations.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>