File Naming - Actual vs Symbolic

Noob question:

I have full Secretary access rights (semi admin) to our member program.
As such, I see different file names for the same file, than does a regular user.

I'm tasked with cleaning up our history vault.
I much prefer the "yyyy.mm.dd file description.ext" file naming convention for numerous reasons.

When I rename a given file as above, it shows correctly for me, but stays with original clunky name for regular users.

Am I looking at "symbolic names" or ??
'NIX noob.
 
Hard to tell, but are you talking about "view of filenames within an application" or "when I do ls -ltr in a directory I see...."

Symlinks are "in this location (directory) make something called X; X is not a real file, but is a reference to the file /usr/local/blahblah/data/12345.dat"

so if your permissions put you in "this location" you will always see X. If everyone else is looking directly at /usr/local/blahblah/data they will see the original names.

Check where regular users are doing "ls" vs your Secretary access doing "ls"
 
I have full Secretary access rights (semi admin) to our member program.
What are secretary access rights? What is your member program? Those terms are not common Unix / BSD terms.

As such, I see different file names for the same file, than does a regular user.
Strange. Commonly, each "file" has one name. Now, using hard links it is possible for one underlying file to have multiple names, that can even be in different directories (within the same file system). Using soft links, it is possible to do even nastier things, like having file "names" that don't actually work and stuff like that.

When I rename a given file as above, it shows correctly for me, but stays with original clunky name for regular users.
That makes me think that what you are looking at is not really files, and what call "names" are not really file names.

Am I looking at "symbolic names" or ??
That term is also not used in file systems, but in source code.
 
Our member program is an application that runs on a 'NIX system.
It is accessed through a web browser by user name (account) and password.
Most are standard users, some are Secretary (semi-admin) for increased function.
The app is maintained by a paid 3rd party vendor which hosts the app on 'NIX systems.

My question is simple: if I rename a file to "yyyy.mm.dd history file 1.txt" why does a standard user see it unchanged as the original "some stupid file name.txt"
 
I presume that if you log in as a standard user you also see "some stupid file name.txt"?

I presume that "app running on a 'NIX system" isn't a FreeBSD system, right?
Seems a bit difficult to assess because there seems some kind of blackbox ("the app") between any user and the actual FreeBSD system; maybe I'm missing something ...

Do you happen to have a possibility to access the FreeBSD system directly without "the app" as a man-in-the-middle-manager?
 
No direct access permitted.
I don't see how a web browser can change file names on the fly, by user account.
This has to be something at the OS level.

I am a unix noob, and not familiar with the file system naming conventions, hard links, etc.
Windows offers the 8.3 (MSDOS) variation of a long file name, but does not change it all around as I note above.

I figured some smart unix guy might know how this is done in the OS.
It seems silly to me that a standard user sees a different file name than does a higher privilege user.
I could reach out to the vendor, but will probably be ignored.
 
[/QUOTE]
Our member program is an application that runs on a 'NIX system.
It is accessed through a web browser by user name (account) and password.
Most are standard users, some are Secretary (semi-admin) for increased function.
The app is maintained by a paid 3rd party vendor which hosts the app on 'NIX systems.

My question is simple: if I rename a file to "yyyy.mm.dd history file 1.txt" why does a standard user see it unchanged as the original "some stupid file name.txt"

No direct access permitted.
So you don't even know whether "yyyy.mm.dd history file 1.txt" is an actual file in the file system. All you know that there is a piece of opaque software, which presents web pages, and on those web pages allows an operation that you think is the rename of a file. But it may be anything else too. And you are complaining that this opaque software is not doing what you want. First suggestion: Contact the vendor of that software. We have no idea what it is doing. Second suggestion: Read the documentation of the software.

Failing that ...
Try whether you can you log in to the FreeBSD system that is hosting the software. Look around the directory structure, and try to find the files in question. A good tool for that is probably the find tool, used with the mtime or ctime switches, to see which files were recently modified or created. Also try to find out whether the software keeps some "state" (like a list of file names?) in a database or something like that. I have no idea where it would store all this though.

You could also check whether the "users" that the software exposes are actually Unix login users: Look at /etc/passwd for a list of users that the OS knows about. Use name "secretary" is not something that is commonly used.

I don't see how a web browser can change file names on the fly, by user account.
This has to be something at the OS level.
I am not at all sure that the "files" you are seeing at the web interface are actually files in the sense of the file system on your FreeBSD machine. It's perfectly easy for a piece of software with a web frontend to present for example data base queries as files. It is also possible that the software keeps an internal mapping of actual files in the file system to the names it presents, so the thing you think should be called "yyyy.mm.dd history file 1.txt" might actually be /home/software/files/4711.data.

I am a unix noob, and not familiar with the file system naming conventions, hard links, etc.
At the most basic level, unix file names don't need a convention. Literally, a file name can be anything that doesn't contain a "/" nor a binary nul character. The slash character is reserved to mark where directory names are; the nul character is the end of the file name, so it can't be contained in it.

In practice, most unix users use very clear conventions. For example: a file called foo.c is probably C language source code, foo.o is the corresponding object file used as input for the linker, and foo is the resulting executable. File foo.txt is probably a human readable and editable file, and readme.txt (exists in many pieces of downloaded software) tends to be instructions. Files foo.jpg, foo.mp4 and foo.sqlite are probably a picture, a movie, and the content of a database. And rc.conf is a configuration file (in this case, the most important one, which configures most of the machine when booting).

Files are arranged in directories, and the directory structure usually follows a well-documented hierarchy, documented in "man hier". Following it is not mandatory: it would be possible to put a login user's home directory into /usr/lib/python3.9/foo, and it would be possible to put an application config file into /home/foo/app.conf, but both are really bad ideas, and in practice nobody does nonsense like that.

It seems silly to me that a standard user sees a different file name than does a higher privilege user.
We haven't even established that these are actually OS files or OS users yet. Given your description, I doubt it.

I could reach out to the vendor, but will probably be ignored.
That is likely the basic problem here. Try looking around on the system to see whether you find users or files, or any other information.
 
I have to chuckle... which part of "no system access" is not clear to you?
There is no "documentation".
The user interface is simply a browser interface that presents login credentials and returns HTML pages.

These files are available to standard users as Read Only.
They are historical archive files of events in the organization.

Admin level users have the ability to rename, edit, modify or delete these archive files.
A standard level user sees a given file name under a specific filespec name.
An admin level user can rename, then see the same file under the renamed filespec.

All I wanted to know is if a non-Windows OS can present a different filename depending upon the security level of the user.
 
This seems like a question for the author of the “member program”, not this forum.
All I wanted to know is if a non-Windows OS can present a different filename depending upon the security level of the user.
FreeBSD or likely any other Unix compatible OS has no such built-in feature. Your “member program” can however implement such a scheme provided its users only access the system through it and have no have direct access to the system.
 
Thanks.
I just wanted to know if any of the 'nix based OS have this capability, and apparently not.

This is just a web server program, no different than any other web system where the user has no direct access to the underlying system.
The user makes an HTML request and a page is served to that user.

What throws me for a complete loop, is the different file name for the same file, depending upon the privilege level of the user.
 
When I rename a given file as above, it shows correctly for me, but stays with original clunky name for regular users.
How are you renaming a file? Through the web interface or via ssh access to the machine? It may be that the change you made is not reflected in some other file the webserver may rely on, as such filename mapping may be stored in a file or something. You need to either talk to whoever setup the website or if it is some standard webserver software, look at whatever online documentation it has to understand all this.
 
I have to chuckle... which part of "no system access" is not clear to you?
You are just being rude to people trying to help you.

You made no mention of it being a web interface in your first post.

Then later when you say things like:
I don't see how a web browser can change file names on the fly, by user account.
This has to be something at the OS level.
You are just displaying your lack of knowledge.
 
I have to chuckle... which part of "no system access" is not clear to you?
Well, in normal Unix language, you probably mean mean "the user can not log into a shell", or "there is no root access". You probably don't even see the file system.

There is no "documentation".
Yuck. This is where it gets difficult. An unhelpful software vendor (you said above they would probably ignore you), and no documentation. I return to my previous suggestion: Log in to the system (initially as a regular user, if you have to change things or see hidden things as root), and try to figure out what is going on.

All I wanted to know is if a non-Windows OS can present a different filename depending upon the security level of the user.
Not normally.

Give me a few hours, and I could build something that looks like what you're describing. For example, I could have normal users alice and bob, with home directories /home/alice and /home/bob, and files /home/alice/file1 and /home/bob/file2, all normal text files. I could create a super-user (probably root?) named charlie, and using hard links make the file /home/lice/file1 visible as /root/data/foo and /home/bob/file2 as /root/data/bar. Getting the permissions right and implementing the link tracking and modification (from a web browser no less, perhaps as CGI scripts or server-side scripting) would be the part that takes a few hours. So in theory, what you describe *IS* possible using standard Unix tools. But it is also unlikely that they did that, because it is difficult, unusual, and brittle. More likely the web application (like most web applications) already has a way to store data (in a database typically, whether it be BerkeleyDB, SQLite or MySQL), and it probably stores user "IDs" and rights in the database. The whole content of the things that you see as "files" from the web interface might just be database rows. Or the database might contain a mapping of user-visible files to real file names, with the real files being for example /home/www/the_application/file1.

As several others already said: I think your problem is not a FreeBSD problem, not even a Unix problem, but a software problem with this application (and their insufficient support and documentation).
 
That is why he is asking here!
I've no problem with that, it's the unnecessary rudeness of the replies and the implication that they know best.

This is basic 101 of building a website, redirecting content based on URIs, but the attitute is that is must be some OS magic sauce and that the replies are lacking because they are not revealing the magic sauce (and especially when so little information was orginally posted.)

Oh, well, welcome to the internet, I know, move on, move on, and I am. Cheerio!
 
There are 40,000 user accounts on this system which operates as a web server.

It seems to me that writing a hack specifically to pass a different filespec to the user based on his privilege level would be quite onerous, and useless.
That is why I was asking if there was some "symbolic" or "alias" for lack of a better word that keeps an old filespec name for regulars, and the renamed filespec name for admins.

I was hopeful that one of the smart guys might think this is a symlink of either soft or hard type.
For example, a standard user is present with a symlink to the file, where the admin user is present with the actual file spec of the file.
This is not my area of expertise, and why I asked it here.

I fully expect to be trolled as well as folks making comments that have nothing to do with my question.
Feel free to move on, as I really don't care at all, because you offered no contribution.
If you think that is rude, so be it.
 
There are 40,000 user accounts on this system which operates as a web server.
That pretty much means that what you call "user accounts" is not what Unix would call a user account. I remember serious scaling problems on AIX and Linux when hitting several thousand user accounts. Just think of how long it takes all the various functions that read /etc/passwd to parse a 40,000 line file. Or having the /home directory with 40,000 entries (the standard technique is to move them to /home/a/alice, /home/b/bob and so on).

From that I conclude that the software has its own concept of users. Which makes my guess that it also has its own concept of files also more likely.

For example, a standard user is present with a symlink to the file, where the admin user is present with the actual file spec of the file.
As I explained above, it could theoretically be done, but it seems very unlikely, as it would be complex . Again, a quick look around the file system will tell you.
 
Again, I have no access to the file system.

This is essentially a web server that handles 40,000 registered accounts and passwords.
There is no /home... structure for user accounts because there is no need.
User info is likely in a database only.

Walking through a file creation scenario:
Admin creates a file accessible for his groups "vault".
This has a real file name and also a symlink name.

The symlink name is presented to the standard user browsing the vault directory.
The true file name is presented to the admin user browsing the directory.
Renaming the file would have to change the symlink pointer to point to the renamed file.

The only reason I can see for this is to guarantee read-only access to standard users.
This also seems like a giant PITA when group permissions would solve this problem.

I will reach out to the vendor and see if I can get an answer.
I expect to be blown off and ignored, which is why I asked here if the above is possible.
 
This is just a web server program, no different than any other web system where the user has no direct access to the underlying system.
The user makes an HTML request and a page is served to that user.
But the HTML page you see can be entirely generated on the fly. That's what modern web applications typically do. You're probably thinking of a fairly basic static web site, where a request for somepage.html accesses a file called somepage.html on the web server and presents this to the web browser. But modern dynamic web applications generally don't work that way. When a web server receives a request for somepage.html the web application code can generate the page entirely on the fly.

This is essentially a web server that handles 40,000 registered accounts and passwords.
So the "files" you see can be entirely virtual. Or stored in a database, or some container, or somewhere else. There doesn't need to be a 1-to-1 relation with whatever you see in the web application and actual files on a filesystem. This is the crucial bit you seem to misunderstand.

There is no /home... structure for user accounts because there is no need.
How can you tell there's no /home if you do not have access to the filesystem? Again, the "file" structure you see in the web application can be entirely virtual.

Walking through a file creation scenario:
Admin creates a file accessible for his groups "vault".
This has a real file name and also a symlink name.
No access to the actual filesystem, again, these files can be entirely virtual. They exist entirely within the web application and may not have a 1-to-1 relation with anything that's stored on the webserver itself.

I expect to be blown off and ignored, which is why I asked here if the above is possible.
How do you know this in advance? Have you tried contacting them before?
 
In addition to the above I, and it seems you as well, have no good understanding of what information is stored where on exactly what OS using what filesystem (UFS, ZFS or even any other arbitrary filesystem overlayed on a ZFS zvol); and perhaps the "archived files" themselves are stored in a database for that matter. You cannot even tell, assuming that FreeBSD is somewhere involved, what FreeBSD version is running; normally we'd likely ask you to run uname -a or freebsd-version -kru.

Without any more relevant detailed information, the expectation that this forum (or as you put it "I figured some smart unix guy might know [...]" should be able to help and solve your problems might very well be overly optimistic.
 
Best guess is that the browser app is showing a different copy of the original file. Copy not symlink.
My $0.02 only, GST/VAT included.
 
It is a custom written web front end, to what I assume is a SQL back end.
I fully expect to be blown off this time, after being blown off the last time.

I am only an admin level user in one of 350 user groups.
Each group has their own "vault" of documents, which is stored "somewhere".
There are hundreds of documents stored in each of these 350 groups vaults.

As a group admin, the vendor won't respond to my query.
But only to a query that comes to them "through channels" which our organization has to pay them to answer.

Anyway, thanks for all the input.
I was curious if 'NIX systems offered some sort of file naming scheme that is not offered in the Windows environment.
 
Back
Top