#13 gprename cannot read folder with ACL permission

v1.0_(example)
open
nobody
None
5
2 days ago
2014-03-25
Zurd
No

Linux Mint create, by default, /media/USERNAME which is owned by root:root but gives a r-x permission to USERNAME through ACL. GPRename cannot enter this folder, says permission denied.

However it works if you use "sudo gprename /media/USERNAME".

ls -l /media
total 4.0K
drwxr-x---+ 4 root root 4.0K Mar 25 02:24 USERNAME

The + sign indicates it has ACL.

getfacl /media/USERNAME
# owner: root
# group: root
user::rwx
user:USERNAME:r-x
group::---
mask::r-x
other::---

Other software can read in the folder, GPRename cannot. A simple Perl script can read the content but gtk2-perl cannot.

Simple perl script test:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/usr/bin/perl

use strict;
use warnings;

my $directory = '/media/USERNAME/';

opendir(DIR, $directory) or die $!;

while (my $file = readdir(DIR)) {
    print $file . "\n";
}

closedir(DIR)

Discussion

  • Thierry

    Thierry - 2 days ago

    Hi
    Any chance to get this issue solved ?

    Thanks

     
  • Zurd

    Zurd - 2 days ago

    Not much chance for a fix, I've been wanting to recode GPRename in Python instead for quite some time because GPRename is coded in GTK2-Perl, it's quite old, not much used elsewhere, documentation is really bad, it's not cross-platform, I really don't like this language.

    I just used Python in another project recently, it was fun to use, I'll try to find time to remake GPRename. Here's a start I just did, there's nothing to download for now, hopefully in a few weeks I'll be able to have a first release.
    https://sourceforge.net/projects/tk-file-renamer/

    Python doesn't seem to have the same problem with permissions if you run this

    from os import listdir
    from os.path import isfile, join
    mypath = "/media/USERNAME/YOUR_SHARE"
    onlyfiles = [f for f in listdir(mypath)]
    print onlyfiles
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks