HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

On file permissions and uploading files

This discussion was created from comments split from: Facebook authorisation doesn't work..

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Personaly I don't mind spliting this topic with @vrijvlinder , because clearly he doesn't get what I mean.

    I am not a man and I do know what you mean, you don't know what I mean or choose to ignore it.

    @R_J said:
    All the rest seems to be silly noise. If MyBB doesn't have that problem, it might because they send other curl headers or do not use curl at all - I don't know and I wouldn't investigate in that direction first.

    Really? ... I posted this much before you came here and he obviously did not pay attention because it's explained curl much better by Bleitvst in this discussion.

    https://open.vanillaforums.com/discussion/27838/again-uniqueid-is-required-facebook-oauth-login-problem

    1. File upload? Why the heck should it matter how a file has been copied from A to B when it is obviously the same at A and B? (No, please! This is only a rhetorical question, really!)

    If you upload a zipped file via ftp you need to extract it in cpanel and have no control what you will overwrite on an installation. You can't remove files you don't want to overwrite every time you update if you overwrite the entire thing by unpacking it in the server.

    Also if you do this from a Windows machine and upload to a Linux server, the permissions getting screwed up.

    1. File permissions? 777/666 from security point of view that is not good. For testing that is optimal, since with this permissions it is granted that your problem

    I told him that already

    has nothing to do with file permissions

    It does because he already explained that he is uploading from windows and if the server is Linux the permissions will be incorrect.

    Permissions set on Windows does not make any difference to files/folders transferred to Linux . He has not said if the Host server is on Linux but that seems to be the case based on the permissions on the files changing when coming from Windows.

    And this problem seems to be on that server, something is not working as it should, hence it is the provider only who can look into it and fix it.

    I think it is hard to follow the real problem when there is so much talk about not related "problems".

    The problem is he tried a bunch of things thinking that would fix it but ignored what he was recommended to do and did whatever he thought would work.As I was trying to help him with 2.3 , he suddenly switched to 2.4 etc. He won't even try to upload the files unzipped to confirm that the zip is what is causing the file permissions to change wrongfully . Which would prove the problem with zipping up to the server and unpacking it there.

    If there is a problem with the server on that installation it won't matter what you do. the Host needs to look into that.

    The basic thing to remember is that virtually all Files require 644 Permissions and all Directories require 755.
    (config files should be set to 400 but 644 will still work for now - security etc)
    (some temp directories require 777 but that is extremely rare and should be avoided 775 works too but without the security problems instead of 777)

    All directories naturally go to 755.

    So when you extract you should be asked on upload files (re mode) whether you wish to set the files at 644.

    Check the box for yes. Some cpanels don't give that option though...

    Upload the archive and extract.

    Now let us know what the permissions are.

    It is obviously easier to recursively FTP directories !!

    What OS is the Compressed file made with, (ie Win, Linux or Mac)?

    What Compressor was used?

    The reason I ask is that Windows OS will often not set the files archived to Server Permissions as you are naturally the owner.

    The easiest way to do this is with xamp for a production environment as the files and permissions are already created for Server environment.

  • Options
    KoriakinKoriakin New
    edited April 2017

    @vrijvlinder

    I am not a man

    Man, woman, hermaphrodite, droid, bot ... who cares novadays...

    ...they send other curl headers or do not use curl at all...

    ...I posted this much before you came...

    And what I supposed to do with that? I'm looking for working solution, not only technical description of my situation. And please keep in your mind that i'M LOOKING for it, not DEMANDING it!

    This would generally be fixed by putting the correct URL in the Facebook app settings page.

    FYI - if you put wrong url there, you will get an error before even reaching FB auth confirmation!

    But if you still want to think I'm not able to, not even rewrite, but at least copy and paste my own urls, then I'm happy I don't know you personally amigo.

    ...no control what you will overwrite...

    You don't get one basical thing - I'm NOT updating anything! If I'm updating then I'm sending file by file - but when I'm making clean install, sending file by file is just stupid... (Every attempt was clean install, not an update - some of them from package and some of them from Installatron)

    Anyway lots of modern scripts are able to update by them selfs.

    I told him that already (about 777/666)

    I thouth I was clear enough - I knew that before you started to use computer without your parents supervision, why the hell you stuck with something I've told few times that I was just suprised to see. Nothing more (but If you like more - goto Post Scriptum :)

    The problem is he tried a bunch of things thinking that would fix it but ignored what he was recommended to do and did whatever he thought would work.

    All you recommended was to:
    1. Use MyBB (I've already commented that)
    2. Read Facebook login guide
    3. Send files one by one
    and I've wrote you twice: I DID THAT!. I did everything what was not even recommended but sugested, MOST of it before I got here. So it's YOU who ignored me.

    I didn't give a sh.t about permitions from the begginig, as long as they are 755/644 (I've only asked why they are comming straight from package with 777/666 in contrast to all other scripts). If you think I was experimenting with different attributes, then you just like to seek problems where are none. I don't have time for that.

    It all comes to one sentence conlusion which you didn't understand from the beggining:

    I am installing, not updating and I perfectly know how permits should look like, so that is NOT my problem here!

    And to answer your latest post:

    So when you extract you should be asked on upload files (re mode) whether you wish to set the files at 644.

    Check the box for yes. Some cpanels don't give that option though...

    Upload the archive and extract.

    P.S.
    I was always installing (not updating!) by sending untouched install package, and files ALWAYS came out (in server enviroment) with usually 644 and dirs with 755, and sometimes if script asked for it there were few of them to change to full.
    But ONLY Vanilla up to now is comming out of package (in the same server enviroment) as 777/666. And please stop repeat that is not not good blah blah.. because that is not the case!!! I was JUST wondering why all other scripts have standard 755/644 out of package and Vanilla not. THAT'S IT PERIOD

    We wasted your time.

    No. You are wasting your time, by bit...ing about matter insignificant in my case.

This discussion has been closed.