[Solved] Running OCC Command on Shared Hosting?

https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html

So I can login using SSH on my Shared Hosting and I am able to run the "php occ" command to list the help file, and I am needing to run the following:
"occ maintenance:update:htaccess"

However the guide recommends the commands be run as the HTTP User and as I don't have access to root I can't run it as a different user, should I still proceed to run the command?

Side note:
The reason I am updating the .htaccess is because I would prefer to remove index.php from my links, why that is even there is beyond me but whatever.. I just want it gone.. so again following some instructions in the documentation I modified my config.php and now I just need to run that command according to the instructions:

have you tried to use the following command:

sudo -i

and then try to run is as www-data?

With a bit of luck you are already the right user. Normally it should show you an error when the users are not matching (the webserver user and the one running the occ command). If that doesn't work you perhaps have to make the modifications to your .htaccess manually.

That probably won't work on shared hosting.

could be - or not -, as he didnt mention the environment so far I'll give any hints that can help :blush:

Hehe yeah sorry also thank you for the help :slight_smile:

Yep it didn't work lol, actually tells me that sudo is not installed which I know isn't true but meh for shared host..

Thanks for letting me know, it didn't give me any errors but just wanted to make sure it'd be okay before running the command, I didn't want to break anything, also I had attempted to modify my .htaccess manually before looking at another solution but it would not work no matter what.. so this was my only choice.

As for the command, I went ahead and ran it just now and it told me:
".htaccess has been updated"
so I went and checked and my links seem "index.php" free and working :slight_smile:
I will be sure to let you know if I break anything else haha, also thank you!

Side note: This was on a shared host provided by Arvixe, in case anyone else needs to know what to do.