• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help cannot rename folderx to .folderx in Android 5.1

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
Hi all,

The subject line says it all. I just switched to a new T-Mobile LG G4 running 5.1 and I can no longer rename folders with an initial '.' to hide them. (These folders are on an external SD card if that makes any difference.) I have tried two methods, both failed:

(1) Using the pre-installed File Manager app, if I try to rename the file by prefixing a '.' I get a little blue popup message saying 'Invalid name'.

(2) On various web recommendations I just installed ES File Explorer, but cannot seem to find any way to rename ANY file, as nothing I do (including a long press on the filename) does anything that leads to a Rename option. (I can get a popup menu that offers Copy and Move options, but not Rename.) I can't believe any usable file manager does not have a way to rename a file, so I presume I'm doing something stupid, but can't for the life of me figure out what.

What's up with all this? I would prefer to just use the standard File Manager if possible.

Thanks!
 
Random programs do not have write permission to directories on the SD card.
Programs can only write to their assigned directories.

Use a usb adapter and rename the directory on a PC.
 
Random programs do not have write permission to directories on the SD card.
Programs can only write to their assigned directories.

Use a usb adapter and rename the directory on a PC.

Ah, yes! I forgot they (Google) tightened this down! (that's what I get for using root and a rooted file manager all the file :p).

Great catch, @glc!

An app can only write (change/rename) a directory and the files within it that they created (they can still read other folders, just not modify them).
 
Random programs do not have write permission to directories on the SD card.
Programs can only write to their assigned directories.

Use a usb adapter and rename the directory on a PC.


Extraordinarily infuriating! Removing my phone from its case, cracking the phone open, removing my SD card and attaching it to a PC just to change a filename is just about the most unworkable solution imaginable. However, I'm not convinced this is the correct answer anyway -- I was previously able to use File Manager to change a .folderx name to folderx, which is how I got into this mess to begin with. I'm now trying to change the name BACK to .folderx, and that does not work. In fact, I can seem to change the name to just about anything that does NOT begin with '.'. The issue seems purely internal to File Manager which is obsessed with preventing me from hiding the file. Furthermore, File Manager will not let me rename a new folder I created just now on my internal storage to begin with '.'. This problem is not specific to the external card.

I did get X-Plore to work as scary alien described, however. Interestingly, though, before it would do the rename it redirected me to some dialog sequence which somehow granted access to the SD card which did not exist before. It didn't look like an internal piece of X-plore but rather some Android utility. Does anyone know what this is and how to make it grant access to any program?

I also tried the terminal emulator as scary alien suggested but that failed with a permissions issue. Here are the permissions on the directory I'm trying to rename:

drwxrwx--- root sdcard_r 2014-11-09 08:06 folderx

Permissions and ownership on the parent directory which contains the folderx directory is the same. I'm not sure what userID I am but it's clearly not root.

This card was transferred from a T-Mobile Samsung S3 Android 4.x phone when I switched to the new LG. Is there anything I can do to file ownership/permissions to make it work better in the new phone?
 
You moved the SD card from an S3 to an LG G4 running Lollipop. Unless S3 was also running Lollipop,
what you could do before is irrelevant.
 
You moved the SD card from an S3 to an LG G4 running Lollipop. Unless S3 was also running Lollipop,
what you could do before is irrelevant.

Certainly! I'm only trying to find out what I need to do now to stop File Manager from behaving like an idiot on my new phone. It can clearly access my external card and rename files to anything that does NOT begin with a '.', so this does not look like a storage access permissions issue. I want to know how to make it accept something that begins with '.' as valid filename.

Is it possible that T-Mobile/LG has kneecapped File Manager for whatever reason?
 
You may have changed the name of a file/directory that file manager did have access to, to a name that is not owned by the file manager.

Even with Kitkat, the file manager can create a directory on the SD card.
It cannot then add any files to the directory, nor rename or remove that directory.
 
You may have changed the name of a file/directory that file manager did have access to, to a name that is not owned by the file manager.

Not sure what you mean by this, perhaps you could explain further? From a Linux background I am familiar with the concept of userIDs having permissions on filesystem objects (e.g., files and directories). I do not understand what you mean by an application having access to a name.

With File Manager on my new phone, on the INTERNAL storage (to remove all question about external SD card access!), I can do the following:

(1) Create a new folder 'junk'.

(2) Rename that folder 'junkxyz'.

(3) Rename that folder 'junkxyzabc'.

In the exact same directory on INTERNAL storage, however, I cannot use File Manager to do any of the following:

(1) Rename any of the above folders to anything beginning with '.'.

(2) Create any new folder with any name beginning with '.'.

Since the userID and the directory in which I am attempting to do all these things is unchanged, the only consistency I can see in any of this is that File Manager will simply not let me use a filename beginning with '.'. However, as noted in an earlier message X-plore is quite happy to let me create the very same .whatever filename that File Manager declares to be invalid, so this is clearly not a system-wide restriction on creating such a filename.

I see no other explanation for this other than the presumption that my copy of File Manager is, for whatever reason, one broken POS.
 
If a dialog popped up asking for permission with X-plore, it sounds like that phone is rooted.
 
If a dialog popped up asking for permission with X-plore, it sounds like that phone is rooted.

Not unless the T-Mobile sales guy did it at the cash register while I wasn't looking. ;->
 
Permissions on non-internal storage is an emulated thing (at best) and does not work like "true" Linux permissions do.

See this article for a little more (better) explanation:

Thanks for the reference, scary alien, I will read it, sorry I overlooked it yesterday! As noted above by my earlier messages, however, my problem is reproducible on internal storage as well, so I'm not sure it will have much bearing on the solution.

Given that another app (X-plore, and thank you so much for that suggestion, I now like it better than File Manager anyway!) can create .whatever filenames, and File Manager is explicitly telling me I am requesting an invalid filename (as opposed to a permissions error), I don't see any plausible explanation other than FM's own bad behavior. I have not seen any other reports of this so I am curious why I'm the lucky Chosen One. If I find the time I may contact T-Mobile/LG tech support, but that's a hell I don't enter lightly.
 
It's 2021 and I'm having this exact problem that @rbd is having.

I can rename my folder to anything but as soon as I put a . (dot) in front of the folder name, it gives me an error. This is with the pre-installed file manager on my Oneplus 5. In the past I used to be able to do it but one day it just stopped working. I'm not sure if it was a system update that caused this or not. Has anyone found a fix for this? (preferably the fix doesn't involve installing annoying 3rd party file manager apps filled with ads etc.)
have you tried other file manager apps? what about hooking the phone up to the computer and have the computer change the name?
 
Back
Top Bottom